public class

BeanProperty

extends Object
java.lang.Object
   ↳ org.apache.commons.betwixt.BeanProperty

Class Overview

Betwixt-centric view of a bean (or pseudo-bean) property. This object decouples the way that the (possibly pseudo) property introspection is performed from the results of that introspection.

Summary

Public Constructors
BeanProperty(String propertyName, Class propertyType, Expression propertyExpression, Updater propertyUpdater)
Construct a BeanProperty.
BeanProperty(PropertyDescriptor descriptor)
Constructs a BeanProperty from a PropertyDescriptor.
BeanProperty(DynaProperty dynaProperty)
Constructs a BeanProperty from a DynaProperty
Public Methods
Descriptor createXMLDescriptor(IntrospectionConfiguration configuration)
Create a XML descriptor from a bean one.
Expression getPropertyExpression()
Gets the expression used to read this property.
String getPropertyName()
Gets the bean name for this property.
Class getPropertyType()
Gets the type of this property.
Updater getPropertyUpdater()
Gets the updater used to write to this properyty.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public BeanProperty (String propertyName, Class propertyType, Expression propertyExpression, Updater propertyUpdater)

Construct a BeanProperty.

Parameters
propertyName not null
propertyType not null
propertyExpression the Expression used to read the property, null if the property is not readable
propertyUpdater the Updater used to write the property, null if the property is not writable

public BeanProperty (PropertyDescriptor descriptor)

Constructs a BeanProperty from a PropertyDescriptor.

Parameters
descriptor not null

public BeanProperty (DynaProperty dynaProperty)

Constructs a BeanProperty from a DynaProperty

Parameters
dynaProperty not null

Public Methods

public Descriptor createXMLDescriptor (IntrospectionConfiguration configuration)

Create a XML descriptor from a bean one. Go through and work out whether it's a loop property, a primitive or a standard. The class property is ignored.

Parameters
configuration IntrospectionConfiguration, not null
Returns
  • a correctly configured NodeDescriptor for the property

public Expression getPropertyExpression ()

Gets the expression used to read this property.

Returns
  • the expression to be used to read this property or null if this property is not readable.

public String getPropertyName ()

Gets the bean name for this property. Betwixt will map this to an xml name.

Returns
  • the bean name for this property, not null

public Class getPropertyType ()

Gets the type of this property.

Returns
  • the property type, not null

public Updater getPropertyUpdater ()

Gets the updater used to write to this properyty.

Returns
  • the Updater to the used to write to this property or null if this property is not writable.