Methods Summary |
---|
public java.lang.Object | get(java.lang.Object obj)Get the property value
return field.get(obj);
|
public java.lang.Object | get(java.lang.Object obj, int i)Get an indexed property
if (!isIndexed()) {
throw new IllegalAccessException("Not an indexed property");
}
Object array = field.get(obj);
return Array.get(array, i);
|
public java.lang.Class | getActualType()
return field.getType();
|
public java.lang.reflect.Field | getField()
return field;
|
public java.lang.String | getName()
return field.getName();
|
public java.lang.Class | getType()Get the type of a property
if (isIndexed()) {
return field.getType().getComponentType();
} else {
return field.getType();
}
|
public boolean | isIndexed()Query if property is indexed.
Indexed properties require valid setters/getters
return (field.getType().getComponentType() != null);
|
public boolean | isReadable()Query if property is readable
return true;
|
public boolean | isWriteable()Query if property is writeable
return true;
|
public void | set(java.lang.Object obj, java.lang.Object newValue)Set the property value
field.set(obj, newValue);
|
public void | set(java.lang.Object obj, int i, java.lang.Object newValue)Set an indexed property value
if (!isIndexed()) {
throw new IllegalAccessException("Not an indexed field!");
}
Class componentType = field.getType().getComponentType();
growArrayToSize(obj, componentType, i);
Array.set(get(obj), i, newValue);
|