public class LinkingUberspector extends AbstractChainableUberspector
When the introspector.uberspect.class configuration property contains several uberspector class names, it means those uberspectors will be chained. When an uberspector in the list other than the leftmost does not implement ChainableUberspector, then this utility class is used to provide a basic default chaining where the first non-null result is kept for each introspection call.
ChainableUberspector
UberspectImpl.VelGetterImpl, UberspectImpl.VelMethodImpl, UberspectImpl.VelSetterImpl
inner
conversionHandler, introspector, log, rsvc
Constructor and Description |
---|
LinkingUberspector(Uberspect left,
Uberspect right)
Constructor that takes the two uberspectors to link
|
Modifier and Type | Method and Description |
---|---|
Iterator |
getIterator(Object obj,
Info i)
To support iterative objects used in a
#foreach()
loop. |
VelMethod |
getMethod(Object obj,
String methodName,
Object[] args,
Info i)
Method
|
VelPropertyGet |
getPropertyGet(Object obj,
String identifier,
Info i)
Property getter
|
VelPropertySet |
getPropertySet(Object obj,
String identifier,
Object arg,
Info i)
Property setter
|
void |
init()
init - the chainable uberspector is responsible for the initialization of the wrapped uberspector
|
wrap
getConversionHandler, setLog, setRuntimeServices
public void init()
Init both wrapped uberspectors
init
in interface Uberspect
init
in class AbstractChainableUberspector
Uberspect.init()
public Iterator getIterator(Object obj, Info i)
#foreach()
loop.getIterator
in interface Uberspect
getIterator
in class AbstractChainableUberspector
obj
- The iterative object.i
- Info about the object's location.Iterator
object.Uberspect.getIterator(java.lang.Object,
org.apache.velocity.util.introspection.Info)
public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i)
getMethod
in interface Uberspect
getMethod
in class AbstractChainableUberspector
Uberspect.getMethod(java.lang.Object, java.lang.String,
java.lang.Object[], org.apache.velocity.util.introspection.Info)
public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
getPropertyGet
in interface Uberspect
getPropertyGet
in class AbstractChainableUberspector
Uberspect.getPropertyGet(java.lang.Object, java.lang.String,
org.apache.velocity.util.introspection.Info)
public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i)
getPropertySet
in interface Uberspect
getPropertySet
in class AbstractChainableUberspector
Uberspect.getPropertySet(java.lang.Object, java.lang.String,
java.lang.Object, org.apache.velocity.util.introspection.Info)
Copyright © 2000–2021 The Apache Software Foundation. All rights reserved.