org.directwebremoting.extend
Class OverrideProperty

java.lang.Object
  extended by org.directwebremoting.extend.OverrideProperty
All Implemented Interfaces:
Property

public class OverrideProperty
extends java.lang.Object
implements Property

A Property for when we've been given override information in a signatures element.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
OverrideProperty(java.lang.Class<?> propertyType)
          All OverrideProperties need a name and the type they are providing
 
Method Summary
 Property createChild(int index)
          Properties may have children where we have nested generic type info.
 java.lang.String getName()
          Gets the name of this property
 java.lang.Class<?> getPropertyType()
          What type does this property
 java.lang.Object getValue(java.lang.Object bean)
          Get the value of this property of the passed in java bean
 void setValue(java.lang.Object bean, java.lang.Object value)
          Set the value of this property of the passed in java bean
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverrideProperty

public OverrideProperty(java.lang.Class<?> propertyType)
All OverrideProperties need a name and the type they are providing

Method Detail

createChild

public Property createChild(int index)
Description copied from interface: Property
Properties may have children where we have nested generic type info. For example with setFoo(List<Map<String, Class<?>> x) we can find type information about the nested bits of generic data.

If calling this method then you almost certainly want to check for an overridden property as defined by the ConverterManager by calling ConverterManager.checkOverride(Property)

Specified by:
createChild in interface Property
Parameters:
index - Generally the parameter offset.
Returns:
A Property to describe the nested bit of data

getName

public java.lang.String getName()
Description copied from interface: Property
Gets the name of this property

Specified by:
getName in interface Property
Returns:
The property name

getPropertyType

public java.lang.Class<?> getPropertyType()
Description copied from interface: Property
What type does this property

Specified by:
getPropertyType in interface Property
Returns:
The type of object that will be returned by Property.getValue(Object)

getValue

public java.lang.Object getValue(java.lang.Object bean)
                          throws ConversionException
Description copied from interface: Property
Get the value of this property of the passed in java bean

Specified by:
getValue in interface Property
Parameters:
bean - The bean to introspect
Returns:
The value assigned to this property of the passed in bean
Throws:
ConversionException - If the reflection access fails

setValue

public void setValue(java.lang.Object bean,
                     java.lang.Object value)
              throws ConversionException
Description copied from interface: Property
Set the value of this property of the passed in java bean

Specified by:
setValue in interface Property
Parameters:
bean - The bean to introspect
value - The value assigned to this property of the passed in bean
Throws:
ConversionException - If the reflection access fails

Copyright 2008