T
- The Model object typepublic abstract class AbstractPropertyModel<T> extends ChainingModel<T> implements IObjectClassAwareModel<T>, IPropertyReflectionAwareModel<T>
PropertyResolver
to resolve expressions on the target model object. Note that the
property resolver by default provides access to private members and methods. If guaranteeing
encapsulation of the target objects is a big concern, you should consider using an alternative
implementation.PropertyResolver
,
IDetachable
,
Serialized FormConstructor and Description |
---|
AbstractPropertyModel(Object modelObject)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Object |
getInnermostModelOrObject() |
T |
getObject()
Gets the model object.
|
Class<T> |
getObjectClass()
Returns the class of model object
|
String |
getPropertyExpression()
Gets the property expression for this model
|
Field |
getPropertyField()
Returns the field of model property or null if the field doesn't exist.
|
Method |
getPropertyGetter()
Returns the getter method of model property or null if the method doesn't exist.
|
Method |
getPropertySetter()
Returns the setter method of model property or null if the method doesn't exist.
|
protected abstract String |
propertyExpression() |
void |
setObject(T object)
Applies the property expression on the model object using the given object argument.
|
detach, getChainedModel, getTarget, setChainedModel, setTarget, toString
public AbstractPropertyModel(Object modelObject)
modelObject
- The nested model objectpublic final String getPropertyExpression()
public void setObject(T object)
setObject
in interface IModel<T>
setObject
in class ChainingModel<T>
object
- The object that will be used when setting a value on the model objectIModel.setObject(Object)
public Class<T> getObjectClass()
IObjectClassAwareModel
getObjectClass
in interface IObjectClassAwareModel<T>
public Field getPropertyField()
IPropertyReflectionAwareModel
getPropertyField
in interface IPropertyReflectionAwareModel<T>
public Method getPropertyGetter()
IPropertyReflectionAwareModel
getPropertyGetter
in interface IPropertyReflectionAwareModel<T>
public Method getPropertySetter()
IPropertyReflectionAwareModel
getPropertySetter
in interface IPropertyReflectionAwareModel<T>
protected abstract String propertyExpression()
public final Object getInnermostModelOrObject()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.