public class UberspectImpl extends java.lang.Object implements Uberspect, UberspectLoggable
| Modifier and Type | Class and Description |
|---|---|
class |
UberspectImpl.VelGetterImpl |
class |
UberspectImpl.VelMethodImpl
An implementation of
VelMethod. |
class |
UberspectImpl.VelSetterImpl |
| Modifier and Type | Field and Description |
|---|---|
private static Introspector |
introspector
the default Velocity introspector.
|
private static int |
PROPERTY_START_INDEX
index of the first character of the property.
|
private org.apache.commons.logging.Log |
rlog
Our runtime logger.
|
| Constructor and Description |
|---|
UberspectImpl() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator |
getIterator(java.lang.Object obj,
Info i)
To support iteratives - #foreach().
|
VelMethod |
getMethod(java.lang.Object obj,
java.lang.String methodName,
java.lang.Object[] args,
Info i)
Returns a general method, corresponding to $foo.bar( $woogie ).
|
VelPropertyGet |
getPropertyGet(java.lang.Object obj,
java.lang.String identifier,
Info i)
Property getter - returns VelPropertyGet appropos for #set($foo =
$bar.woogie).
|
VelPropertySet |
getPropertySet(java.lang.Object obj,
java.lang.String identifier,
java.lang.Object arg,
Info i)
Property setter - returns VelPropertySet appropos for #set($foo.bar =
"geir").
|
void |
init()
init - does nothing - we need to have setRuntimeLogger called before
getting our introspector, as the default vel introspector depends upon
it.
|
void |
setRuntimeLogger(org.apache.commons.logging.Log runtimeLogger)
Sets the runtime logger - this must be called before anything else
besides init() as to get the logger.
|
private static final int PROPERTY_START_INDEX
private org.apache.commons.logging.Log rlog
private static Introspector introspector
public void init()
throws java.lang.Exception
public void setRuntimeLogger(org.apache.commons.logging.Log runtimeLogger)
setRuntimeLogger in interface UberspectLoggableruntimeLogger - service to use for logging.public java.util.Iterator getIterator(java.lang.Object obj,
Info i)
throws java.lang.Exception
getIterator in interface Uberspectobj - to get the iterator for.i - template info.java.lang.Exception - on any error.public VelMethod getMethod(java.lang.Object obj, java.lang.String methodName, java.lang.Object[] args, Info i) throws java.lang.Exception
public VelPropertyGet getPropertyGet(java.lang.Object obj, java.lang.String identifier, Info i) throws java.lang.Exception
getPropertyGet in interface Uberspectobj - the object to get the property from.identifier - property namei - template infoVelPropertyGet.java.lang.Exception - on any error.public VelPropertySet getPropertySet(java.lang.Object obj, java.lang.String identifier, java.lang.Object arg, Info i) throws java.lang.Exception
getPropertySet in interface Uberspectobj - the object to get the property from.identifier - property namearg - value to set.i - template infoVelPropertySet.java.lang.Exception - on any error.