Known Direct Subclasses
|
Class Overview
A Velocity uberspect that boxes return values in an annotated form and unboxes them again when used as arguments
to or targets of method calls
More specifically this uberspect will inspect any target method call or property for annotations that are marked as
ReturnValueAnnotation
s and box the result of calling or accessing the target with these annotations.
Summary
[Expand]
Inherited Fields |
From class
org.apache.velocity.util.introspection.UberspectImpl
|
Public Constructors
public
AnnotationBoxingUberspect
()
Public Methods
public
final
Iterator
getIterator
(Object obj, Info info)
Get an iterator responsible for preserving annotations while iterating over a collection that has collection
inheritable return value annotations.'
Parameters
obj
| object to get an iterator for |
info
| current template info |
Returns
- Inheritable annotation preserving iterator
Return a method that knows how to unbox method call targets and parameters and to box return values
according to the return value boxing policy.
Parameters
obj
| Object to locate the method on |
methodName
| Name of the method to locate |
args
| Method call arguments |
info
| Current template info |
Returns
- Method calling strategy that will transparently handle boxed arguments and targets while automatically
boxing method return values with return value annotations.
Get a property getting strategy that will box the end result with any return value annotations on the property getter
Parameters
obj
| Object on which a property is being retrieved |
identifier
| Property identifier |
info
| Current template info |
Returns
- A return value boxing property getter
Protected Methods
protected
Class
getClassForTargetObject
(Object targetObject)
Template method for returning the actual concrete class of a the provided object.
This method should be overridden in environments where objects may be proxied in such a way that
method annotations are not reflected by the proxying object class.
This implementation simply returns targetObject.getClass()
Parameters
targetObject
| The object for which the class is being queried |
Returns
- The actual class that should be queried for return value annotations