Class SetPublicFieldExecutor
- java.lang.Object
-
- org.apache.velocity.runtime.parser.node.SetExecutor
-
- org.apache.velocity.runtime.parser.node.SetPublicFieldExecutor
-
public class SetPublicFieldExecutor extends SetExecutor
Executor for setting public fields in objects
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Field
field
Field to be accessedprivate Introspector
introspector
-
Fields inherited from class org.apache.velocity.runtime.parser.node.SetExecutor
log
-
-
Constructor Summary
Constructors Constructor Description SetPublicFieldExecutor(org.slf4j.Logger log, Introspector introspector, java.lang.Class<?> clazz, java.lang.String property, java.lang.Object arg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
discover(java.lang.Class<?> clazz, java.lang.String property, java.lang.Object arg)
java.lang.Object
execute(java.lang.Object o, java.lang.Object value)
Execute method against context.java.lang.reflect.Field
getField()
protected Introspector
getIntrospector()
boolean
isAlive()
Tell whether the executor is alive by looking at the value of the method.protected void
setField(java.lang.reflect.Field field)
-
Methods inherited from class org.apache.velocity.runtime.parser.node.SetExecutor
getMethod, setMethod
-
-
-
-
Field Detail
-
introspector
private final Introspector introspector
-
field
private java.lang.reflect.Field field
Field to be accessed
-
-
Constructor Detail
-
SetPublicFieldExecutor
public SetPublicFieldExecutor(org.slf4j.Logger log, Introspector introspector, java.lang.Class<?> clazz, java.lang.String property, java.lang.Object arg)
- Parameters:
log
-introspector
-clazz
-property
-arg
-
-
-
Method Detail
-
isAlive
public boolean isAlive()
Description copied from class:SetExecutor
Tell whether the executor is alive by looking at the value of the method.- Overrides:
isAlive
in classSetExecutor
- Returns:
- True if the 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.
-
discover
protected void discover(java.lang.Class<?> clazz, java.lang.String property, java.lang.Object arg)
- Parameters:
clazz
-property
-arg
-
-
execute
public java.lang.Object execute(java.lang.Object o, java.lang.Object value) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
Execute method against context.- Specified by:
execute
in classSetExecutor
- Parameters:
o
-value
-- Returns:
- The value of the invocation.
- Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
-
-