public class PojoPropertyAccessorProxyGetByKey extends AbstractPojoPropertyAccessorProxy implements PojoPropertyAccessorNonArg
PojoPropertyAccessorNonArg
acting as as a
getter
that delegates
to a
mapped-getter
using a
fixed key.Modifier and Type | Field and Description |
---|---|
private PojoPropertyAccessorOneArg |
delegate |
private Object |
key |
Constructor and Description |
---|
PojoPropertyAccessorProxyGetByKey(PojoPropertyAccessorOneArg delegate,
Object key)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected PojoPropertyAccessorOneArg |
getDelegate()
This method gets the
accessor this proxy delegates to. |
PojoPropertyAccessorNonArgMode |
getMode()
This method gets the mode of this accessor.
|
Object |
invoke(Object pojoInstance)
This method invokes the according property-method of
pojoInstance with the given arguments. |
getAccessibleObject, getAccessibleObjectName, getDeclaringClass, getModifiers, getName, getPropertyClass, getPropertyType, getReturnClass, getReturnType
toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAccessibleObject, getAccessibleObjectName, getDeclaringClass, getModifiers, getPropertyClass, getPropertyType, getReturnClass, getReturnType
getName
private final PojoPropertyAccessorOneArg delegate
private final Object key
public PojoPropertyAccessorProxyGetByKey(PojoPropertyAccessorOneArg delegate, Object key)
delegate
- is the delegate
.key
- is the mapped key to use.public PojoPropertyAccessorNonArgMode getMode()
PojoPropertyAccessor
getMode
in interface PojoPropertyAccessor
getMode
in interface PojoPropertyAccessorNonArg
getMode
in class AbstractPojoPropertyAccessorProxy
protected PojoPropertyAccessorOneArg getDelegate()
AbstractPojoPropertyAccessorProxy
accessor
this proxy delegates to.getDelegate
in class AbstractPojoPropertyAccessorProxy
public Object invoke(Object pojoInstance) throws ReflectionException
PojoPropertyAccessorNonArg
pojoInstance
with the given arguments. invoke
in interface PojoPropertyAccessorNonArg
pojoInstance
- is the instance of the POJO where to access the property. Has to be an instance of the
type
from where this accessor was
created for.null
if void (e.g. initialize method). For a regular
getter this will be the value of the property.ReflectionException
- if the underlying accessor
caused an
error during reflection.Copyright © 2001–2016 mmm-Team. All rights reserved.