|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.joda.beans.StandardMetaProperty<B,P>
B - the type of the beanP - the type of the property contentpublic final class StandardMetaProperty<B,P>
A meta-property implemented using a PropertyDescriptor.
The property descriptor class is part of the JDK JavaBean standard. It provides access to get and set a property on a bean.
| Method Summary | ||
|---|---|---|
Class<B> |
beanClass()
Get the type of the bean represented as a Class. |
|
Property<B,P> |
createProperty(B bean)
Creates a property that binds this meta-property to a specific bean. |
|
P |
get(B bean)
Gets the value of the bound property for the provided bean. |
|
String |
name()
Gets the property name. |
|
static
|
of(Class<B> beanType,
String propertyName)
Factory to create a meta-property avoiding duplicate generics. |
|
Class<P> |
propertyClass()
Get the type of the property represented as a Class. |
|
ReadWriteProperty |
readWrite()
Gets whether the property is read-only, read-write or write-only. |
|
void |
set(B bean,
P value)
Sets the value of the bound property on the provided bean. |
|
String |
toString()
Returns a string that summarizes the property. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <B,P> StandardMetaProperty<B,P> of(Class<B> beanType,
String propertyName)
beanType - the bean typepropertyName - the property namepublic Property<B,P> createProperty(B bean)
MetaProperty
createProperty in interface MetaProperty<B,P>bean - the bean to create the property for, not null
public String name()
MetaPropertyThe JavaBean style methods getFoo() and setFoo() will lead to a property name of 'foo' and so on.
name in interface MetaProperty<B,P>public Class<P> propertyClass()
MetaPropertyClass.
propertyClass in interface MetaProperty<B,P>public Class<B> beanClass()
MetaPropertyClass.
beanClass in interface MetaProperty<B,P>public ReadWriteProperty readWrite()
MetaProperty
readWrite in interface MetaProperty<B,P>public P get(B bean)
This is the equivalent to calling getFoo() on the bean itself.
However some implementations of this interface may not require an actual get method.
get in interface MetaProperty<B,P>bean - the bean to query, not null
UnsupportedOperationException - if the property is write-only
public void set(B bean,
P value)
This is the equivalent to calling setFoo() on the bean itself.
However some implementations of this interface may not require an actual set method.
set in interface MetaProperty<B,P>bean - the bean to update, not nullvalue - the value to set into the property on the bound bean
UnsupportedOperationException - if the property is read-onlypublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||