public class ExpressionAsClosureHolder extends AbstractClosureHolder
ClosureHolder
from an expression.
The expression is treated as a closure without arguments.Constructor and Description |
---|
ExpressionAsClosureHolder(Namespace namespace,
ClosureType type,
Expression 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... arguments)
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.
|
execute, execute, execute, getId, getNamespace, getNotCompiledValueHolder
public ExpressionAsClosureHolder(Namespace namespace, ClosureType type, Expression expr, ClosureOrigin origin)
ClosureExpressionHolder
.namespace
- type
- expr
- origin
- the expression originNullPointerException
- 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... arguments) throws ErrorException
ClosureHolderInternal
ErrorException
public ClosureType getType()
ValueHolder
public String getExpressionString()
ClosureHolder
public ClosureOrigin getClosureOrigin()
null
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.