public class ClosureExpressionHolder extends AbstractClosureHolder
ClosureExpression
to ClosureHolder
adapter.Modifier and Type | Field and Description |
---|---|
static String |
CLOSURE_NAMESPACE_NAME
Namespace name for closures.
|
Constructor and Description |
---|
ClosureExpressionHolder(Namespace namespace,
ClosureType type,
ClosureExpression expr,
ClosureOrigin origin)
Creates new instance of
ClosureExpressionHolder . |
Modifier and Type | Method and Description |
---|---|
Object |
execute(InterpreterConfiguration configuration,
InterpreterStackTrace stackTrace,
Object... args)
Executes this closure with given arguments.
|
Object |
executeInNamespace(Namespace namespace,
InterpreterStackTrace stackTrace,
Object... args)
Execute this closure in the given namespace.
|
ClosureOrigin |
getClosureOrigin() |
String |
getExpressionString()
Returns a string representation of this closure holder expression.
|
ClosureType |
getType()
Returns the type of the holder.
|
String |
toString() |
execute, execute, execute, getId, getNamespace, getNotCompiledValueHolder
public static final String CLOSURE_NAMESPACE_NAME
public ClosureExpressionHolder(Namespace namespace, ClosureType type, ClosureExpression expr, ClosureOrigin origin)
ClosureExpressionHolder
.namespace
- type
- expr
- origin
- NullPointerException
- if namespace
or type
or expr
is nullpublic Object execute(InterpreterConfiguration configuration, InterpreterStackTrace stackTrace, Object... args) throws ErrorException
ClosureHolder
configuration
- configuration to apply while interpreting closurestackTrace
- a stack traceErrorException
public Object executeInNamespace(Namespace namespace, InterpreterStackTrace stackTrace, Object... args) throws ErrorException
ClosureHolderInternal
ErrorException
public ClosureType getType()
ValueHolder
public String getExpressionString()
ClosureHolder
public ClosureOrigin getClosureOrigin()
null
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.