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 Object
implements Function, Evaluate


Field Summary
static String LOCATION
           
 
Constructor Summary
Closure(CommandSessionImpl session, Closure parent, CharSequence source)
           
 
Method Summary
 Object eval(Token t)
           
 Object execute(CommandSession x, List<Object> values)
          Execute this function and return the result.
 Object executeStatement(List<Token> statement)
           
 Object get(String name)
           
 Object put(String key, Object value)
           
 CommandSessionImpl session()
           
 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 String LOCATION
See Also:
Constant Field Values
Constructor Detail

Closure

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

session

public CommandSessionImpl session()

execute

public Object execute(CommandSession x,
                      List<Object> values)
               throws 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:
Exception - if anything goes terribly wrong

eval

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

executeStatement

public Object executeStatement(List<Token> statement)
                        throws Exception
Throws:
Exception

get

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

put

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.