Files

24 lines
681 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# EzoicMask.js — fieldAny() (satır 38)
[← EzoicMask.js](index.md) · [← Master](../../wiki.md)
```javascript
function fieldAny(object, names)
{
for (var i = 0; i < names.length; i++)
{
try { var value = object[names[i]]; if (value != null) return value; } catch(e) {}
}
var cls = object.getClass();
while (cls != null)
{
for (var n = 0; n < names.length; n++)
{
try { var field = cls.getDeclaredField(names[n]); field.setAccessible(true); return field.get(object); } catch(e) {}
}
cls = cls.getSuperclass();
}
throw "Field bulunamadi: " + names.join("/");
}
```