jcaas.script_nodes
Class Context

java.lang.Object
  extended by jcaas.script_nodes.Context
Direct Known Subclasses:
AnnotationContext, EvaluationContext, MusicContext

public abstract class Context
extends java.lang.Object

This class facilitates a shared storage area for a script.


Constructor Summary
Context()
          Creates a default instance of this class.
 
Method Summary
 JFunction getMethodFunction(Identifier obj_id, Identifier method_id)
           
 AnnotationFunctions getScriptFunctions()
          Gets the script functions to use.
 StaticFunction getStaticFunction(Identifier id)
           
 java.lang.Object getVal(java.lang.Object key)
          Gets the value of a given expression in this context.
 void reset()
          Clears the context.
 void setScriptFunctions(AnnotationFunctions functions)
          Sets the script functions to use.
 java.lang.Object setVal(java.lang.Object key, java.lang.Object val)
          Sets the value of the given expression in this context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Context

public Context()
Creates a default instance of this class.

Method Detail

getVal

public java.lang.Object getVal(java.lang.Object key)
Gets the value of a given expression in this context.

Parameters:
key - the expression to find the value of.
Returns:
the value of the of the given expression.

setVal

public java.lang.Object setVal(java.lang.Object key,
                               java.lang.Object val)
Sets the value of the given expression in this context.

Parameters:
key - the expression to set the value of.
val - the value of the expression.
Returns:

reset

public void reset()
Clears the context.


setScriptFunctions

public void setScriptFunctions(AnnotationFunctions functions)
Sets the script functions to use.

Parameters:
functions -

getStaticFunction

public StaticFunction getStaticFunction(Identifier id)

getMethodFunction

public JFunction getMethodFunction(Identifier obj_id,
                                   Identifier method_id)

getScriptFunctions

public AnnotationFunctions getScriptFunctions()
Gets the script functions to use.

Returns: