org.apache.felix.gogo.runtime
Class Closure

java.lang.Object
  extended by org.apache.felix.gogo.runtime.Closure
All Implemented Interfaces:
Evaluate, Function

public class Closure
extends java.lang.Object
implements Function, Evaluate


Field Summary
static java.lang.String LOCATION
           
 
Constructor Summary
Closure(CommandSessionImpl session, Closure parent, java.lang.CharSequence source)
           
 
Method Summary
 java.lang.Object eval(Token t)
           
 java.lang.Object execute(CommandSession x, java.util.List<java.lang.Object> values)
          Execute this function and return the result.
 java.lang.Object executeStatement(java.util.List<Token> statement)
           
 java.lang.Object get(java.lang.String name)
           
 java.lang.Object put(java.lang.String key, java.lang.Object value)
           
 CommandSessionImpl session()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOCATION

public static final java.lang.String LOCATION
See Also:
Constant Field Values
Constructor Detail

Closure

public Closure(CommandSessionImpl session,
               Closure parent,
               java.lang.CharSequence source)
        throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

session

public CommandSessionImpl session()

execute

public java.lang.Object execute(CommandSession x,
                                java.util.List<java.lang.Object> values)
                         throws java.lang.Exception
Description copied from interface: Function
Execute this function and return the result.

Specified by:
execute in interface Function
Returns:
the result from the execution.
Throws:
java.lang.Exception - if anything goes terribly wrong

eval

public java.lang.Object eval(Token t)
                      throws java.lang.Exception
Specified by:
eval in interface Evaluate
Throws:
java.lang.Exception

executeStatement

public java.lang.Object executeStatement(java.util.List<Token> statement)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

get

public java.lang.Object get(java.lang.String name)
Specified by:
get in interface Evaluate

put

public java.lang.Object put(java.lang.String key,
                            java.lang.Object value)
Specified by:
put in interface Evaluate

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2012. All Rights Reserved.