public abstract class PropertyResolver extends Object
Constructor and Description |
---|
PropertyResolver()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
abstract Class |
getType(Object base,
int index)
Deprecated.
|
abstract Class |
getType(Object base,
Object property)
Deprecated.
|
abstract Object |
getValue(Object base,
int index)
Deprecated.
|
abstract Object |
getValue(Object base,
Object property)
Deprecated.
|
abstract boolean |
isReadOnly(Object base,
int index)
Deprecated.
|
abstract boolean |
isReadOnly(Object base,
Object property)
Deprecated.
|
abstract void |
setValue(Object base,
int index,
Object value)
Deprecated.
|
abstract void |
setValue(Object base,
Object property,
Object value)
Deprecated.
|
public abstract Class getType(Object base, int index) throws EvaluationException, PropertyNotFoundException
Param base must be of type Array or List.
public abstract Class getType(Object base, Object property) throws EvaluationException, PropertyNotFoundException
Param base may be a map, in which case param property is used as a key into the map, and the type of the object with that key is returned. If there is no such key in the map, then Object.class is returned.
Otherwise java.beans.Introspector is used to determine the actual property type. If the base bean has no such property then a PropertyNotFoundException is thrown.
base
- must not be null.property
- must be of type String, must not be null and must not be an empty string.EvaluationException
PropertyNotFoundException
public abstract Object getValue(Object base, int index) throws EvaluationException, PropertyNotFoundException
Param base must be of type Array or List. When the array is of a primitive type, the appropriate wrapper is returned.
Null is returned when param index is "out of bounds" for the provided base object.
ReferenceSyntaxException
- if the base object is not an Array or List.EvaluationException
PropertyNotFoundException
public abstract Object getValue(Object base, Object property) throws EvaluationException, PropertyNotFoundException
If base is a Map, then Map.get(property) is returned. Null is returned if there is no entry with that key.
Otherwise, java.beans.Introspector is applied to the base object to find the associated PropertyDescriptor and the specified read method is invoked.
PropertyNotFoundException
- if the provided object does not have the specified property.EvaluationException
public abstract boolean isReadOnly(Object base, int index) throws EvaluationException, PropertyNotFoundException
public abstract boolean isReadOnly(Object base, Object property) throws EvaluationException, PropertyNotFoundException
public abstract void setValue(Object base, int index, Object value) throws EvaluationException, PropertyNotFoundException
Param base is expected to be an Array or List object.
EvaluationException
- if the base object is not an Array or List.PropertyNotFoundException
- if the index is "out of bounds".public abstract void setValue(Object base, Object property, Object value) throws EvaluationException, PropertyNotFoundException
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.