|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.velocity.util.introspection.UberspectImpl org.apache.velocity.tools.generic.introspection.PublicFieldUberspect
public class PublicFieldUberspect
Uberspect implementation that exposes public fields. Also exposes the explicit "length" field of arrays.
To use, tell Velocity to use this class for introspection
by adding the following to your velocity.properties:
runtime.introspector.uberspect = org.apache.velocity.tools.generic.introspection.PublicFieldUberspect
Nested Class Summary | |
---|---|
protected class |
PublicFieldUberspect.ArrayLengthGetter
Implementation of VelPropertyGet that gets length from arrays. |
protected class |
PublicFieldUberspect.PublicFieldGetter
Implementation of VelPropertyGet that gets from public fields. |
protected class |
PublicFieldUberspect.PublicFieldSetter
Implementation of VelPropertySet that sets to public fields. |
Nested classes/interfaces inherited from class org.apache.velocity.util.introspection.UberspectImpl |
---|
org.apache.velocity.util.introspection.UberspectImpl.VelGetterImpl, org.apache.velocity.util.introspection.UberspectImpl.VelMethodImpl, org.apache.velocity.util.introspection.UberspectImpl.VelSetterImpl |
Constructor Summary | |
---|---|
PublicFieldUberspect()
Default constructor. |
Method Summary | |
---|---|
org.apache.velocity.util.introspection.VelPropertyGet |
getPropertyGet(java.lang.Object obj,
java.lang.String identifier,
org.apache.velocity.util.introspection.Info i)
Property getter - returns VelPropertyGet appropos for #set($foo = $bar.woogie). |
org.apache.velocity.util.introspection.VelPropertySet |
getPropertySet(java.lang.Object obj,
java.lang.String identifier,
java.lang.Object arg,
org.apache.velocity.util.introspection.Info i)
Property setter - returns VelPropertySet appropos for #set($foo.bar = "geir"). |
Methods inherited from class org.apache.velocity.util.introspection.UberspectImpl |
---|
getIterator, getMethod, init, setRuntimeLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PublicFieldUberspect()
Method Detail |
---|
public org.apache.velocity.util.introspection.VelPropertyGet getPropertyGet(java.lang.Object obj, java.lang.String identifier, org.apache.velocity.util.introspection.Info i) throws java.lang.Exception
VelPropertyGet
for the length
property of arrays.
Otherwise tries the regular routine. If a getter was not found,
returns a VelPropertyGet
that gets from public fields.
getPropertyGet
in interface org.apache.velocity.util.introspection.Uberspect
getPropertyGet
in class org.apache.velocity.util.introspection.UberspectImpl
obj
- the objectidentifier
- the name of the propertyi
- a bunch of information.
VelPropertyGet
, if it was found.
java.lang.Exception
- failed to create a valid VelPropertyGet
.public org.apache.velocity.util.introspection.VelPropertySet getPropertySet(java.lang.Object obj, java.lang.String identifier, java.lang.Object arg, org.apache.velocity.util.introspection.Info i) throws java.lang.Exception
VelPropertySet
that sets to public fields.
getPropertySet
in interface org.apache.velocity.util.introspection.Uberspect
getPropertySet
in class org.apache.velocity.util.introspection.UberspectImpl
obj
- the objectidentifier
- the name of the propertyarg
- the value to set to the propertyi
- a bunch of information.
VelPropertySet
, if it was found.
java.lang.Exception
- failed to create a valid VelPropertySet
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |