|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.betwixt.BeanProperty
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.
Field Summary | |
private Expression |
propertyExpression
The Expression used to read values of this property (possibly null) |
private java.lang.String |
propertyName
The bean name for the property (not null) |
private java.lang.Class |
propertyType
The type of this property (not null) |
private Updater |
propertyUpdater
The Updater used to write values of this property (possibly null) |
Constructor Summary | |
BeanProperty(org.apache.commons.beanutils.DynaProperty dynaProperty)
Constructs a BeanProperty from a DynaProperty |
|
BeanProperty(java.beans.PropertyDescriptor descriptor)
Constructs a BeanProperty from a PropertyDescriptor . |
|
BeanProperty(java.lang.String propertyName,
java.lang.Class propertyType,
Expression propertyExpression,
Updater propertyUpdater)
Construct a BeanProperty. |
Method Summary | |
private void |
configureDescriptor(NodeDescriptor descriptor,
IntrospectionConfiguration configuration)
Configures descriptor (in the standard way). |
private ElementDescriptor |
createDescriptorForCollective(IntrospectionConfiguration configuration,
Updater propertyUpdater,
Expression propertyExpression)
Creates an ElementDescriptor for a collective type property |
private ElementDescriptor |
createDescriptorForMap(IntrospectionConfiguration configuration,
Expression propertyExpression)
Creates an ElementDescriptor for an Map type property |
private NodeDescriptor |
createDescriptorForPrimitive(IntrospectionConfiguration configuration,
Expression propertyExpression,
Updater propertyUpdater)
Creates a NodeDescriptor for a primitive type node |
private ElementDescriptor |
createDescriptorForStandard(Expression propertyExpression,
Updater propertyUpdater,
IntrospectionConfiguration configuration)
Creates an ElementDescriptor for a standard property |
Descriptor |
createXMLDescriptor(IntrospectionConfiguration configuration)
Create a XML descriptor from a bean one. |
Expression |
getPropertyExpression()
Gets the expression used to read this property. |
java.lang.String |
getPropertyName()
Gets the bean name for this property. |
java.lang.Class |
getPropertyType()
Gets the type of this property. |
Updater |
getPropertyUpdater()
Gets the updater used to write to this properyty. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final java.lang.String propertyName
private final java.lang.Class propertyType
private Expression propertyExpression
private Updater propertyUpdater
Constructor Detail |
public BeanProperty(java.lang.String propertyName, java.lang.Class propertyType, Expression propertyExpression, Updater propertyUpdater)
propertyName
- not nullpropertyType
- not nullpropertyExpression
- the Expression used to read the property,
null if the property is not readablepropertyUpdater
- the Updater used to write the property,
null if the property is not writablepublic BeanProperty(java.beans.PropertyDescriptor descriptor)
PropertyDescriptor
.
descriptor
- not nullpublic BeanProperty(org.apache.commons.beanutils.DynaProperty dynaProperty)
DynaProperty
dynaProperty
- not nullMethod Detail |
public java.lang.String getPropertyName()
public java.lang.Class getPropertyType()
public Expression getPropertyExpression()
public Updater getPropertyUpdater()
public Descriptor createXMLDescriptor(IntrospectionConfiguration configuration)
configuration
- IntrospectionConfiguration
, not null
NodeDescriptor
for the propertyprivate void configureDescriptor(NodeDescriptor descriptor, IntrospectionConfiguration configuration)
descriptor
- Descriptor to map, not nullconfiguration
- IntrospectionConfiguration, not nullprivate ElementDescriptor createDescriptorForStandard(Expression propertyExpression, Updater propertyUpdater, IntrospectionConfiguration configuration)
ElementDescriptor
for a standard property
propertyExpression
- propertyUpdater
-
private ElementDescriptor createDescriptorForMap(IntrospectionConfiguration configuration, Expression propertyExpression)
Map
type property
configuration
- propertyExpression
-
private ElementDescriptor createDescriptorForCollective(IntrospectionConfiguration configuration, Updater propertyUpdater, Expression propertyExpression)
ElementDescriptor
for a collective type property
configuration
- propertyExpression
-
private NodeDescriptor createDescriptorForPrimitive(IntrospectionConfiguration configuration, Expression propertyExpression, Updater propertyUpdater)
configuration
- propertyExpression
- propertyUpdater
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |