return new ReflectionProperty(env, _cls, name);
}
public ArrayValue getProperties(Env env)
{
ArrayValue array = new ArrayValueImpl();
HashMap<StringValue,ClassField> fieldMap = _cls.getClassFields();
for (ClassField field : fieldMap.values()) {
if (field.isPublic()) {
ReflectionProperty prop
= ReflectionProperty.create(env, _cls, field.getName(), false);
array.put(env.wrapJava(prop));
}
}
ArrayList<StringValue> staticFieldList = _cls.getStaticFieldNames();
for (StringValue fieldName : staticFieldList) {
ReflectionProperty prop
= ReflectionProperty.create(env, _cls, fieldName, true);
array.put(env.wrapJava(prop));
}
return array;
}