|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
P - the type of the property contentpublic interface Property<P>
A property that is linked to a specific bean.
For a JavaBean, this will ultimately wrap a get/set method pair. Alternate implementations may perform any logic to obtain the value.
| Method Summary | ||
|---|---|---|
|
bean()
Gets the bean which owns this property. |
|
boolean |
equals(Object obj)
Checks if this property equals another. |
|
P |
get()
Gets the value of the property for the associated bean. |
|
int |
hashCode()
Returns a suitable hash code. |
|
MetaProperty<P> |
metaProperty()
Gets the meta-property representing the parts of the property that are common across all instances, such as the name. |
|
String |
name()
Gets the property name. |
|
P |
put(Object value)
Sets the value of the property on the associated bean and returns the previous value. |
|
void |
set(Object value)
Sets the value of the property on the associated bean. |
|
| Method Detail |
|---|
<B extends Bean> B bean()
Each property is fully owned by a single bean.
B - the bean type
MetaProperty<P> metaProperty()
String name()
The JavaBean style methods getFoo() and setFoo() will lead to a property name of 'foo' and so on.
P get()
For a JavaBean, this is the equivalent to calling getFoo() on the bean itself.
Alternate implementations may perform any logic to obtain the value.
UnsupportedOperationException - if the property is write-onlyvoid set(Object value)
The value must be of the correct type for the property.
See the meta-property for string conversion.
For a standard JavaBean, this is equivalent to calling setFoo() on the bean.
Alternate implementations may perform any logic to change the value.
value - the value to set into the property on the bean
ClassCastException - if the value is of an invalid type for the property
UnsupportedOperationException - if the property is read-only
RuntimeException - if the value is rejected by the property (use appropriate subclasses)P put(Object value)
This is a combination of the get and set methods that matches the definition
of put in a Map.
value - the value to set into the property on the bean
ClassCastException - if the value is of an invalid type for the property
UnsupportedOperationException - if the property is read-only
RuntimeException - if the value is rejected by the property (use appropriate subclasses)boolean equals(Object obj)
This compares the meta-property and value. It does not consider the property or bean types.
equals in class Objectobj - the other property, null returns false
int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||