org.joda.beans.impl.map
Class MapBeanMetaProperty

java.lang.Object
  extended by org.joda.beans.impl.BasicMetaProperty<Object>
      extended by org.joda.beans.impl.map.MapBeanMetaProperty
All Implemented Interfaces:
MetaProperty<Object>

public class MapBeanMetaProperty
extends BasicMetaProperty<Object>

A meta-property using a MapBean for storage.

Author:
Stephen Colebourne

Method Summary
 List<Annotation> annotations()
          Gets the annotations of the property.
 Property<Object> createProperty(Bean bean)
          Creates a property that binds this meta-property to a specific bean.
 Object 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 MapBeanMetaProperty of(MapBean mapBean, String propertyName)
          Factory to create a meta-property.
 Class<Object> propertyGenericType()
          Gets the generic types of the property.
 Class<Object> propertyType()
          Get the type of the property represented as a Class.
 PropertyReadWrite readWrite()
          Gets whether the property is read-only, read-write or write-only.
 void set(Bean bean, Object value)
          Sets the value of the property on the specified bean.
 
Methods inherited from class org.joda.beans.impl.BasicMetaProperty
annotation, equals, hashCode, name, put, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

of

public static MapBeanMetaProperty of(MapBean mapBean,
                                     String propertyName)
Factory to create a meta-property.

Parameters:
mapBean - the MapBean, not null
propertyName - the property name, not empty

createProperty

public Property<Object> createProperty(Bean bean)
Description copied from interface: MetaProperty
Creates a property that binds this meta-property to a specific bean.

Specified by:
createProperty in interface MetaProperty<Object>
Overrides:
createProperty in class BasicMetaProperty<Object>
Parameters:
bean - the bean to create the property for, not null
Returns:
the property, not null

metaBean

public MetaBean metaBean()
Description copied from interface: MetaProperty
Gets the meta-bean which owns this meta-property.

Each meta-property is fully owned by a single bean.

Returns:
the meta-bean, not null

propertyType

public Class<Object> propertyType()
Description copied from interface: MetaProperty
Get the type of the property represented as a Class.

Returns:
the type of the property, not null

propertyGenericType

public Class<Object> propertyGenericType()
Description copied from interface: MetaProperty
Gets the generic types of the property.

This provides access to the generic type declared in the source code.

Returns:
the full generic type of the property, unmodifiable, not null

readWrite

public PropertyReadWrite readWrite()
Description copied from interface: MetaProperty
Gets whether the property is read-only, read-write or write-only.

Returns:
the property read-write type, not null

annotations

public List<Annotation> annotations()
Description copied from interface: MetaProperty
Gets the annotations of the property.

Returns:
the annotations, unmodifiable, not null

get

public Object get(Bean bean)
Description copied from interface: MetaProperty
Gets the value of the property for the specified bean.

For a standard JavaBean, this is equivalent to calling getFoo() on the bean. Alternate implementations may perform any logic to obtain the value.

Parameters:
bean - the bean to query, not null
Returns:
the value of the property on the specified bean, may be null

set

public void set(Bean bean,
                Object value)
Description copied from interface: MetaProperty
Sets the value of the property on the specified bean.

For a standard JavaBean, this is equivalent to calling setFoo() on the bean. Alternate implementations may perform any logic to change the value.

Parameters:
bean - the bean to update, not null
value - the value to set into the property on the specified bean, may be null


Copyright © 2007-2011 Joda.org. All Rights Reserved.