cookxml.core
Class DefaultVarLookup

java.lang.Object
  extended bycookxml.core.DefaultVarLookup
All Implemented Interfaces:
VarLookup

public class DefaultVarLookup
extends Object
implements VarLookup

Default behavior of handling a variable field. It basically looks up the field from the class using the name provided.

Since:
CookXml 2.0

Field Summary
 Object varObject
           
 
Constructor Summary
DefaultVarLookup(Object varObject)
           
 
Method Summary
 Object getVariable(String name, DecodeEngine decodeEngine)
          getting a variable by its name.
 void setVariable(String name, Object value, DecodeEngine decodeEngine)
          setting a variable by its name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

varObject

public final Object varObject
Constructor Detail

DefaultVarLookup

public DefaultVarLookup(Object varObject)
Method Detail

getVariable

public Object getVariable(String name,
                          DecodeEngine decodeEngine)
                   throws VarLookupException
Description copied from interface: VarLookup
getting a variable by its name.

Specified by:
getVariable in interface VarLookup
Parameters:
name - the name of the variable
decodeEngine - the DecodeEngine being used.
Returns:
the value of the variable.
Throws:
VarLookupException

setVariable

public void setVariable(String name,
                        Object value,
                        DecodeEngine decodeEngine)
                 throws VarLookupException
Description copied from interface: VarLookup
setting a variable by its name.

Specified by:
setVariable in interface VarLookup
Parameters:
name - the name of the variable
value - the new value for the variable
decodeEngine - the DecodeEngine being used.
Throws:
VarLookupException