use of org.beetl.core.om.GeneralGetMethodInvoker in project beetl2.0 by javamonkey.
the class HasAttributeFunction method call.
@Override
public Object call(Object[] paras, Context ctx) {
Object o = paras[0];
if (o == null) {
throw new NullPointerException();
}
if (o instanceof Map) {
return false;
}
Class type = o.getClass();
for (int i = 1; i < paras.length; i++) {
String key = (String) paras[i];
MethodInvoker invoke = ObjectUtil.getInvokder(type, key);
if (invoke == null) {
return false;
} else if (invoke instanceof GeneralGetMethodInvoker) {
return false;
}
}
return true;
}
Aggregations