Package org.apache.felix.gogo.runtime
Class Closure
- java.lang.Object
-
- org.apache.felix.gogo.runtime.Closure
-
-
Field Summary
Fields Modifier and Type Field Description static String
LOCATION
static String
PIPE_EXCEPTION
-
Constructor Summary
Constructors Constructor Description Closure(CommandSessionImpl session, Closure parent, CharSequence source)
Closure(CommandSessionImpl session, Closure parent, Parser.Program program)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoader
classLoader()
Path
currentDir()
Object
eval(Token t)
Object
eval(Token t, boolean convertNumeric)
Object
execute(Parser.Executable executable)
Object
execute(CommandSession x, List<Object> values)
Execute this function and return the result.Object
execute(CommandSession x, List<Object> values, Channel capturingOutput)
Object
executeStatement(Parser.Statement statement)
Object
expr(Token expr)
Object
get(String name)
protected boolean
isSet(String name, boolean def)
Object
put(String key, Object value)
CommandSessionImpl
session()
String
toString()
-
-
-
Field Detail
-
LOCATION
public static final String LOCATION
- See Also:
- Constant Field Values
-
PIPE_EXCEPTION
public static final String PIPE_EXCEPTION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Closure
public Closure(CommandSessionImpl session, Closure parent, CharSequence source) throws Exception
- Throws:
Exception
-
Closure
public Closure(CommandSessionImpl session, Closure parent, Parser.Program program)
-
-
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.
-
execute
public Object execute(CommandSession x, List<Object> values, Channel capturingOutput) throws Exception
- Throws:
Exception
-
execute
public Object execute(Parser.Executable executable) throws Exception
- Throws:
Exception
-
executeStatement
public Object executeStatement(Parser.Statement statement) throws Exception
- Throws:
Exception
-
currentDir
public Path currentDir()
- Specified by:
currentDir
in interfaceEvaluate
-
classLoader
public ClassLoader classLoader()
- Specified by:
classLoader
in interfaceEvaluate
-
isSet
protected boolean isSet(String name, boolean def)
-
-