org.webmacro.engine
Class ConstantPropertyVariable

java.lang.Object
  extended byorg.webmacro.engine.Variable
      extended byorg.webmacro.engine.ConstantPropertyVariable
All Implemented Interfaces:
Macro, Visitable

public class ConstantPropertyVariable
extends Variable

Operate on bean properties of a compile-time constant

Since:
1.1
Author:
Brian Goetz

Field Summary
 
Fields inherited from class org.webmacro.engine.Variable
_names, _vname, LOCAL_TYPE, PROPERTY_TYPE
 
Method Summary
 java.lang.Object getValue(Context context)
          Look up my value in the corresponding Map, possibly using introspection, and return it
 void setValue(Context context, java.lang.Object newValue)
          Look up my the value of this variable in the specified Map, possibly using introspection, and set it to the supplied value.
 java.lang.String toString()
          Return a string representation naming the variable for debugging purposes.
 
Methods inherited from class org.webmacro.engine.Variable
accept, evaluate, getName, getPropertyNames, getVariableName, isSimpleName, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getValue

public final java.lang.Object getValue(Context context)
                                throws PropertyException
Look up my value in the corresponding Map, possibly using introspection, and return it

Specified by:
getValue in class Variable
Throws:
PropertyException - If the property does not exist

setValue

public final void setValue(Context context,
                           java.lang.Object newValue)
                    throws PropertyException
Look up my the value of this variable in the specified Map, possibly using introspection, and set it to the supplied value.

Specified by:
setValue in class Variable
Throws:
PropertyException - If the property does not exist

toString

public final java.lang.String toString()
Return a string representation naming the variable for debugging purposes.

Specified by:
toString in class Variable