JavaScript is disabled on your browser.
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods
Modifier and Type
Method and Description
protected java.lang.Object
convertForProperty (java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue,
TypeDescriptor td)
protected abstract NotWritablePropertyException
createNotWritablePropertyException (java.lang.String propertyName)
int
getAutoGrowCollectionLimit ()
Return the limit for array and collection auto-growing.
protected java.lang.String
getFinalPath (AbstractNestablePropertyAccessor pa,
java.lang.String nestedPath)
Get the last component of the path.
protected abstract AbstractNestablePropertyAccessor.PropertyHandler
getLocalPropertyHandler (java.lang.String propertyName)
java.lang.String
getNestedPath ()
Return the nested path of the object wrapped by this accessor.
protected AbstractNestablePropertyAccessor
getPropertyAccessorForPropertyPath (java.lang.String propertyPath)
Recursively navigate to return a property accessor for the nested property path.
protected AbstractNestablePropertyAccessor.PropertyHandler
getPropertyHandler (java.lang.String propertyName)
java.lang.Class<?>
getPropertyType (java.lang.String propertyName)
Determine the property type for the given property path.
TypeDescriptor
getPropertyTypeDescriptor (java.lang.String propertyName)
Return a type descriptor for the specified property:
preferably from the read method, falling back to the write method.
protected java.lang.Object
getPropertyValue (AbstractNestablePropertyAccessor.PropertyTokenHolder tokens)
java.lang.Object
getPropertyValue (java.lang.String propertyName)
Actually get the value of a property.
java.lang.Class<?>
getRootClass ()
Return the class of the root object at the top of the path of this accessor.
java.lang.Object
getRootInstance ()
Return the root object at the top of the path of this accessor.
java.lang.Class<?>
getWrappedClass ()
java.lang.Object
getWrappedInstance ()
boolean
isReadableProperty (java.lang.String propertyName)
Determine whether the specified property is readable.
boolean
isWritableProperty (java.lang.String propertyName)
Determine whether the specified property is writable.
protected abstract AbstractNestablePropertyAccessor
newNestedPropertyAccessor (java.lang.Object object,
java.lang.String nestedPath)
Create a new nested property accessor instance.
void
setAutoGrowCollectionLimit (int autoGrowCollectionLimit)
Specify a limit for array and collection auto-growing.
protected void
setPropertyValue (AbstractNestablePropertyAccessor.PropertyTokenHolder tokens,
PropertyValue pv)
void
setPropertyValue (PropertyValue pv)
Set the specified value as current property value.
void
setPropertyValue (java.lang.String propertyName,
java.lang.Object value)
Actually set a property value.
void
setWrappedInstance (java.lang.Object object)
Switch the target object, replacing the cached introspection results only
if the class of the new object is different to that of the replaced object.
void
setWrappedInstance (java.lang.Object object,
java.lang.String nestedPath,
java.lang.Object rootObject)
Switch the target object, replacing the cached introspection results only
if the class of the new object is different to that of the replaced object.
java.lang.String
toString ()
copyCustomEditorsTo , copyDefaultEditorsTo , findCustomEditor , getConversionService , getDefaultEditor , guessPropertyTypeFromEditors , hasCustomEditorForElement , overrideDefaultEditor , registerCustomEditor , registerCustomEditor , registerDefaultEditors , setConversionService , useConfigValueEditors
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
AbstractNestablePropertyAccessor
protected AbstractNestablePropertyAccessor(java.lang.Class<?> clazz)
Create a new accessor, wrapping a new instance of the specified class.
Parameters:
clazz
- class to instantiate and wrap
AbstractNestablePropertyAccessor
protected AbstractNestablePropertyAccessor(java.lang.Object object,
java.lang.String nestedPath,
java.lang.Object rootObject)
Create a new accessor for the given object,
registering a nested path that the object is in.
Parameters:
object
- object wrapped by this accessor
nestedPath
- the nested path of the object
rootObject
- the root object at the top of the path
AbstractNestablePropertyAccessor
protected AbstractNestablePropertyAccessor(java.lang.Object object,
java.lang.String nestedPath,
AbstractNestablePropertyAccessor parent)
Create a new accessor for the given object,
registering a nested path that the object is in.
Parameters:
object
- object wrapped by this accessor
nestedPath
- the nested path of the object
parent
- the containing accessor (must not be null
)
Method Detail
setWrappedInstance
public void setWrappedInstance(java.lang.Object object)
Switch the target object, replacing the cached introspection results only
if the class of the new object is different to that of the replaced object.
Parameters:
object
- the new target object
setWrappedInstance
public void setWrappedInstance(java.lang.Object object,
@Nullable
java.lang.String nestedPath,
@Nullable
java.lang.Object rootObject)
Switch the target object, replacing the cached introspection results only
if the class of the new object is different to that of the replaced object.
Parameters:
object
- the new target object
nestedPath
- the nested path of the object
rootObject
- the root object at the top of the path
getPropertyTypeDescriptor
@Nullable
public TypeDescriptor getPropertyTypeDescriptor(java.lang.String propertyName)
throws BeansException
Return a type descriptor for the specified property:
preferably from the read method, falling back to the write method.
Parameters:
propertyName
- the property to check
(may be a nested path and/or an indexed/mapped property)
Returns:
the property type for the particular property,
or null
if not determinable
Throws:
PropertyAccessException
- if the property was valid but the
accessor method failed
BeansException
newNestedPropertyAccessor
protected abstract AbstractNestablePropertyAccessor newNestedPropertyAccessor(java.lang.Object object,
java.lang.String nestedPath)
Create a new nested property accessor instance.
Can be overridden in subclasses to create a PropertyAccessor subclass.
Parameters:
object
- object wrapped by this PropertyAccessor
nestedPath
- the nested path of the object
Returns:
the nested PropertyAccessor instance
getFinalPath
protected java.lang.String getFinalPath(AbstractNestablePropertyAccessor pa,
java.lang.String nestedPath)
Get the last component of the path. Also works if not nested.
Parameters:
pa
- property accessor to work on
nestedPath
- property path we know is nested
Returns:
last component of the path (the property on the target bean)