Class PublicFieldExecutor
- java.lang.Object
-
- org.apache.velocity.runtime.parser.node.AbstractExecutor
-
- org.apache.velocity.runtime.parser.node.PublicFieldExecutor
-
public class PublicFieldExecutor extends AbstractExecutor
Returns the value of a public field when executed.
-
-
Field Summary
-
Fields inherited from class org.apache.velocity.runtime.parser.node.AbstractExecutor
log
-
-
Constructor Summary
Constructors Constructor Description PublicFieldExecutor(org.slf4j.Logger log, Introspector introspector, java.lang.Class<?> clazz, java.lang.String property)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddiscover(java.lang.Class<?> clazz, java.lang.String property)java.lang.Objectexecute(java.lang.Object o)Execute method against context.java.lang.reflect.FieldgetField()protected IntrospectorgetIntrospector()booleanisAlive()Tell whether the executor is alive by looking at the value of the method.protected voidsetField(java.lang.reflect.Field field)-
Methods inherited from class org.apache.velocity.runtime.parser.node.AbstractExecutor
getMethod, setMethod
-
-
-
-
Constructor Detail
-
PublicFieldExecutor
public PublicFieldExecutor(org.slf4j.Logger log, Introspector introspector, java.lang.Class<?> clazz, java.lang.String property)- Parameters:
log-introspector-clazz-property-- Since:
- 1.5
-
-
Method Detail
-
isAlive
public boolean isAlive()
Description copied from class:AbstractExecutorTell whether the executor is alive by looking at the value of the method.- Overrides:
isAlivein classAbstractExecutor- Returns:
- True if executor is alive.
-
getField
public java.lang.reflect.Field getField()
- Returns:
- The current field.
-
setField
protected void setField(java.lang.reflect.Field field)
- Parameters:
field-
-
getIntrospector
protected Introspector getIntrospector()
- Returns:
- The current introspector.
- Since:
- 1.5
-
discover
protected void discover(java.lang.Class<?> clazz, java.lang.String property)- Parameters:
clazz-property-
-
execute
public java.lang.Object execute(java.lang.Object o) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetExceptionDescription copied from class:AbstractExecutorExecute method against context.- Specified by:
executein classAbstractExecutor- Returns:
- The resulting object.
- Throws:
java.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetException- See Also:
AbstractExecutor.execute(java.lang.Object)
-
-