org.omegahat.Environment.Language
Class Closure

java.lang.Object
  |
  +--org.omegahat.Environment.Language.Function
        |
        +--org.omegahat.Environment.Language.Closure
All Implemented Interfaces:
Evaluable, java.io.Serializable
Direct Known Subclasses:
TailRecursiveClosure

public class Closure
extends Function

See Also:
Serialized Form

Field Summary
protected  boolean isInitialized
           
protected  List staticDeclarations
           
protected  Database staticVariables
           
 
Fields inherited from class org.omegahat.Environment.Language.Function
argumentNames, body, documentation, exceptions, hasVariableArguments, MissingArgument, name, OptionalArgumentsVariableName, OptionalArgumentVariablePrefix, returnType, templateFrame
 
Constructor Summary
Closure(ExpressionInt body, List args, Name returnType, List exceptions, java.lang.String name, Evaluator evaluator)
           
 
Method Summary
 java.lang.Object eval(Database db, boolean merge, Evaluator evaluator)
          Evaluate the function with the arguments provided in the given Database which should have been created previously by matching the arguments to the parameters of this function.
 int findStatics(ExpressionInt body)
           
 int initializeStatics(Evaluator evaluator)
           
 boolean isInitialized()
           
 boolean isInitialized(boolean val)
           
protected  boolean isStaticVariable(LocalVariable v)
           
 List staticDeclarations()
           
 List staticDeclarations(List l)
           
 Database staticVariables()
           
 Database staticVariables(Database db)
           
 
Methods inherited from class org.omegahat.Environment.Language.Function
addArgument, addArgument, addArgument, addArgument, addArgument, addArgument, addArgumentName, argList, argList, argList, argumentName, argumentNames, argumentNames, assignArgument, assignNamedArgument, body, body, body, callFrame, checkReturnType, createCallFrame, createVariable, eval, eval, eval, eval, eval, evalBody, exceptions, exceptions, exceptions, frame, functionName, getDocumentation, getFirstChild, hasVariableArguments, hasVariableArguments, isSynchronized, lazy, matchArgument, matchArguments, matchArguments, name, name, parameterTypes, returnType, returnType, setDocumentation, setDocumentation, showArg, showArguments, showArguments, signature, templateArgument, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

staticVariables

protected Database staticVariables

staticDeclarations

protected List staticDeclarations

isInitialized

protected boolean isInitialized
Constructor Detail

Closure

public Closure(ExpressionInt body,
               List args,
               Name returnType,
               List exceptions,
               java.lang.String name,
               Evaluator evaluator)
        throws java.lang.ClassNotFoundException
Method Detail

eval

public java.lang.Object eval(Database db,
                             boolean merge,
                             Evaluator evaluator)
                      throws java.lang.Throwable
Description copied from class: Function
Evaluate the function with the arguments provided in the given Database which should have been created previously by matching the arguments to the parameters of this function.
Overrides:
eval in class Function
Following copied from class: org.omegahat.Environment.Language.Function
See Also:
#matchArguments()

initializeStatics

public int initializeStatics(Evaluator evaluator)
                      throws java.lang.Throwable

findStatics

public int findStatics(ExpressionInt body)

isStaticVariable

protected boolean isStaticVariable(LocalVariable v)

isInitialized

public boolean isInitialized()

isInitialized

public boolean isInitialized(boolean val)

staticVariables

public Database staticVariables()

staticVariables

public Database staticVariables(Database db)

staticDeclarations

public List staticDeclarations()

staticDeclarations

public List staticDeclarations(List l)