Joda System API

org.joda.property.impl
Class PropertyMetaData

java.lang.Object
  |
  +--org.joda.property.impl.PropertyMetaData

public class PropertyMetaData
extends java.lang.Object

MetaData about a Property derived by reflection.

Author:
Stephen Colebourne

Field Summary
protected  java.lang.reflect.Method iGetterMethod
          The getter method
protected  java.lang.String iName
          The name of the property within the bean
protected  java.lang.Class iPropertyDataClass
          The class (if any) that is handling the property data access
protected  int iPropertyEnumeration
          The type of the property
protected  java.lang.reflect.Method iPropertyMethod
          The property method
protected  java.lang.Class[] iPropertyTypes
          The ordered type array that this property deals with
protected  java.lang.reflect.Method iSetterMethod
          The setter method
protected  java.lang.reflect.Method iShortcutPropertyMethod
          The shortcut property method
static int LINK
           
static int LIST
           
static int MAP
           
static int SIMPLE
           
 
Constructor Summary
protected PropertyMetaData(java.lang.Class beanClass, java.lang.reflect.Method propertyMethod, java.lang.reflect.Method[] beanMethods)
          Constructor.
 
Method Summary
protected  java.lang.Class convertPrimitiveClass(java.lang.Class input)
          Check the input class to see if it is a primitive type.
 java.lang.reflect.Method getGetterMethod()
          Gets the getter method.
 java.lang.Class getPropertyDataClass()
          Gets the PropertyDataClass (if any) for the property.
 int getPropertyEnumeration()
          Gets the property enumeration.
 java.lang.reflect.Method getPropertyMethod()
          Gets the propertyMethod.
 java.lang.String getPropertyName()
          Gets the name.
 java.lang.Class[] getPropertyTypes()
          Gets the types that the property deals with.
 java.lang.Class getPropertyWrapperType()
          Gets the type of the property wrapper, such as StringProperty.
 java.lang.reflect.Method getSetterMethod()
          Gets the setter method.
 java.lang.reflect.Method getShortcutPropertyMethod()
          Gets the Shortcut Method, such as person() for a personLink() property..
protected  void initLinkProperty(java.lang.Class cls, java.lang.reflect.Method[] beanMethods)
          Initialize for link properties
protected  void initListProperty(java.lang.Class cls, java.lang.reflect.Method[] beanMethods)
          Initialize for list properties
protected  void initMapProperty(java.lang.Class cls, java.lang.reflect.Method[] beanMethods)
          Initialize for map properties
protected  void initPropertyDataClass(java.lang.Class cls)
          Initialize the property data class
protected  void initSimpleProperty(java.lang.Class cls, java.lang.reflect.Method[] beanMethods)
          Initialize for simple data properties
 java.lang.String toString()
          Get a debugging string representing this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SIMPLE

public static final int SIMPLE
See Also:
Constant Field Values

LINK

public static final int LINK
See Also:
Constant Field Values

LIST

public static final int LIST
See Also:
Constant Field Values

MAP

public static final int MAP
See Also:
Constant Field Values

iName

protected final java.lang.String iName
The name of the property within the bean


iPropertyTypes

protected java.lang.Class[] iPropertyTypes
The ordered type array that this property deals with


iPropertyDataClass

protected java.lang.Class iPropertyDataClass
The class (if any) that is handling the property data access


iPropertyEnumeration

protected int iPropertyEnumeration
The type of the property


iPropertyMethod

protected java.lang.reflect.Method iPropertyMethod
The property method


iShortcutPropertyMethod

protected java.lang.reflect.Method iShortcutPropertyMethod
The shortcut property method


iGetterMethod

protected java.lang.reflect.Method iGetterMethod
The getter method


iSetterMethod

protected java.lang.reflect.Method iSetterMethod
The setter method

Constructor Detail

PropertyMetaData

protected PropertyMetaData(java.lang.Class beanClass,
                           java.lang.reflect.Method propertyMethod,
                           java.lang.reflect.Method[] beanMethods)
Constructor.

Method Detail

initSimpleProperty

protected void initSimpleProperty(java.lang.Class cls,
                                  java.lang.reflect.Method[] beanMethods)
Initialize for simple data properties


initLinkProperty

protected void initLinkProperty(java.lang.Class cls,
                                java.lang.reflect.Method[] beanMethods)
Initialize for link properties


initListProperty

protected void initListProperty(java.lang.Class cls,
                                java.lang.reflect.Method[] beanMethods)
Initialize for list properties


initMapProperty

protected void initMapProperty(java.lang.Class cls,
                               java.lang.reflect.Method[] beanMethods)
Initialize for map properties


convertPrimitiveClass

protected java.lang.Class convertPrimitiveClass(java.lang.Class input)
Check the input class to see if it is a primitive type. If it is return the equivalent object type


initPropertyDataClass

protected void initPropertyDataClass(java.lang.Class cls)
Initialize the property data class


getPropertyName

public java.lang.String getPropertyName()
Gets the name.

Returns:
the name of the property

getPropertyDataClass

public java.lang.Class getPropertyDataClass()
Gets the PropertyDataClass (if any) for the property.

Returns:
the special PropertyDataClass

getPropertyWrapperType

public java.lang.Class getPropertyWrapperType()
Gets the type of the property wrapper, such as StringProperty.

Returns:
the type

getPropertyTypes

public java.lang.Class[] getPropertyTypes()
Gets the types that the property deals with.

Returns:
the ordered array of types the property handles

getPropertyEnumeration

public int getPropertyEnumeration()
Gets the property enumeration.

Returns:
an enumeration of the type of property

getPropertyMethod

public java.lang.reflect.Method getPropertyMethod()
Gets the propertyMethod.

Returns:
the property method

getShortcutPropertyMethod

public java.lang.reflect.Method getShortcutPropertyMethod()
Gets the Shortcut Method, such as person() for a personLink() property..

Returns:
the Shortcut property method

getGetterMethod

public java.lang.reflect.Method getGetterMethod()
Gets the getter method.

Returns:
the getter method

getSetterMethod

public java.lang.reflect.Method getSetterMethod()
Gets the setter method.

Returns:
the getter method

toString

public java.lang.String toString()
Get a debugging string representing this object.

Overrides:
toString in class java.lang.Object
Returns:
debugging string

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.