|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.joda.beans.impl.BasicMetaProperty<P>
org.joda.beans.impl.StandaloneMetaProperty<P>
P - the type of the property contentpublic final class StandaloneMetaProperty<P>
A meta-property that exists separate from a bean.
One use case for this is to handle renamed properties in SerDeserializer.
| Method Summary | ||
|---|---|---|
List<Annotation> |
annotations()
Gets the annotations of the property. |
|
Class<?> |
declaringType()
Get the type that declares the property, represented as a Class. |
|
P |
get(Bean bean)
Gets the value of the property for the specified bean. |
|
MetaBean |
metaBean()
Gets the meta-bean which owns this meta-property. |
|
static
|
of(String propertyName,
MetaBean metaBean,
Class<R> clazz)
Creates a non-generified property. |
|
static
|
of(String propertyName,
MetaBean metaBean,
Class<R> clazz,
Type type)
Creates a property. |
|
Type |
propertyGenericType()
Gets the generic types of the property. |
|
Class<P> |
propertyType()
Get the type of the property represented as a Class. |
|
void |
set(Bean bean,
Object value)
Sets the value of the property on the specified bean. |
|
PropertyStyle |
style()
Gets the style of the property, such as read-only, read-write or write-only. |
|
| Methods inherited from class org.joda.beans.impl.BasicMetaProperty |
|---|
annotation, createProperty, equals, getString, getString, hashCode, name, put, setString, setString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <R> StandaloneMetaProperty<R> of(String propertyName,
MetaBean metaBean,
Class<R> clazz)
R - the property typepropertyName - the property name, not emptymetaBean - the meta-bean, which does not have to refer to this property, not nullclazz - the type of the property, not null
public static <R> StandaloneMetaProperty<R> of(String propertyName,
MetaBean metaBean,
Class<R> clazz,
Type type)
R - the property typepropertyName - the property name, not emptymetaBean - the meta-bean, which does not have to refer to this property, not nullclazz - the type of the property, not nulltype - the type of the property, not null
public MetaBean metaBean()
MetaPropertyEach meta-property is fully owned by a single bean.
public Class<?> declaringType()
MetaPropertyClass.
public Class<P> propertyType()
MetaPropertyClass.
public Type propertyGenericType()
MetaPropertyThis provides access to the generic type declared in the source code.
public PropertyStyle style()
MetaProperty
public List<Annotation> annotations()
MetaProperty
public P get(Bean bean)
MetaProperty
For a standard JavaBean, this is equivalent to calling getFoo() on the bean.
Alternate implementations may perform any logic to obtain the value.
bean - the bean to query, not null
public void set(Bean bean,
Object value)
MetaProperty
The value must be of the correct type for the property.
For a standard JavaBean, this is equivalent to calling setFoo() on the bean.
Alternate implementations may perform any logic to change the value.
bean - the bean to update, not nullvalue - the value to set into the property on the specified bean, may be null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||