|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.miginfocom.property.PropertyInfo<T>
com.miginfocom.property.FieldPropertyInfo<T>
public class FieldPropertyInfo<T>
Extends PropertyInfo to also include a reference to a Field.
Sub classes should always be immutable since this class is typically cached.
BeanProperty| Constructor Summary | |
|---|---|
FieldPropertyInfo(java.lang.reflect.Field field,
Transfer set,
Transfer get,
boolean modifiable,
FirePolicy fire,
java.util.List<? extends Validator<T>> validators,
java.lang.String[] groups,
boolean observable)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.reflect.Field |
getField()
Returns the Field that is holding this property in the bean. |
java.util.List<java.lang.reflect.Type> |
getGenericTypes()
Returns the types that the proeprty was created with. |
FieldProperty |
getProperty(java.lang.Object bean)
Helper method to get the actual property object from the bean. |
java.lang.String |
toString()
|
| Methods inherited from class com.miginfocom.property.PropertyInfo |
|---|
getFirePolicy, getGetPolicy, getGroups, getSetPolicy, getValidators, hasValidators, isGroup, isModifiable, isObservable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FieldPropertyInfo(java.lang.reflect.Field field,
Transfer set,
Transfer get,
boolean modifiable,
FirePolicy fire,
java.util.List<? extends Validator<T>> validators,
java.lang.String[] groups,
boolean observable)
field - The field that holds this property. Never null.set - The policy for set operations. Never null.get - The policy for get operations. Never null.modifiable - If the value's content can be changes. For instance the add and remove for a CollectionProperty.fire - The policy how to compare old and new values to know when to fire change events. Never null.validators - Optinal validators. May be null if no vaidators.groups - Optinal goups. May be null if no vaidators.observable - If this property's value can be observed. If true then net.java.properties.PropertyI#addPropertyListener(net.java.properties.PropertyListener)
and net.java.properties.PropertyI#removePropertyListener(net.java.properties.PropertyListener) must be implmented.| Method Detail |
|---|
public final java.lang.reflect.Field getField()
Field that is holding this property in the bean.
Field that is holding this property in the bean. Never null.public final java.util.List<java.lang.reflect.Type> getGenericTypes()
Note that this is the generic type of the declared field and if it is a cast to a raw type with for instance:
public final Property mapProperty = new MapProperty
There will be no generic types as they are not saved for runtime. This is how Java works.
null. Will be of length 0 in some circumstances.
public final FieldProperty getProperty(java.lang.Object bean)
throws java.lang.IllegalAccessException
bean - The bean that holds the property.
java.lang.IllegalAccessException - If the field could not be accesses reflectively.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||