public final class ClosureExpression extends ContextReferencingExpression
| Constructor and Description |
|---|
ClosureExpression(ASTInfo info,
ClosureType closureType,
Expression expression,
List<String> argNames) |
| Modifier and Type | Method and Description |
|---|---|
<T,E extends Throwable> |
accept(ExpressionVisitor<T,E> visitor)
Accepts visitor.
|
protected Object |
basicInterpret(Interpreter interpreter,
InterpreterStackTrace stackTrace)
Interpret expression.
|
List<String> |
getArgNames()
Returns the argument names.
|
Map<String,ASTRange> |
getArgTypeRanges()
Returns the map of argument type ranges.
|
Expression |
getExpression()
Returns the body expression.
|
ClosureType |
getType()
Returns the return type.
|
boolean |
isBodyCreatingNonModuleContextObjects()
Returns
true if the body expression creates non-module context objects,
e.g. |
boolean |
isReferencingNonModuleContext()
Returns
true if the closure is referencing
non-module variables from outside scope and or methods (if
it is in a method body). |
createANTLRParser, doInterpret, evalCondition, evaluate, evaluateToExpressions, executeCompiled, getCompiled, getDebugLine, getParseTimeConstant, getPrimaryRange, getPropertySelectorRange, getResultExpression, getResultExpressions, interpret, interpretInCurrentNamespace, isCreatingNonModuleContextObjects, isParseTimeConstant, requiresNewNamespace, setCompiled, showInFullText, showInSurroundingText, showInText, toExpressionsgetFullText, getLine, getNodeText, getText, toStringcontains, getBeginIndex, getEndIndex, getLengthclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFullText, getLine, getNodeText, getTextcontains, getBeginIndex, getEndIndex, getLengthpublic ClosureExpression(ASTInfo info, ClosureType closureType, Expression expression, List<String> argNames)
info - closureType - expression - argNames - NullPointerException - if expression or argNames is nullIllegalArgumentException - if argNames contains nullpublic ClosureType getType()
ExpressiongetType in class Expressionpublic Expression getExpression()
public List<String> getArgNames()
public boolean isReferencingNonModuleContext()
ContextReferencingExpressiontrue if the closure is referencing
non-module variables from outside scope and or methods (if
it is in a method body).isReferencingNonModuleContext in class ContextReferencingExpressiontrue if the closure is referencing
enclosing non-module contextpublic boolean isBodyCreatingNonModuleContextObjects()
true if the body expression creates non-module context objects,
e.g. closures or references that reference non-module variables.true if the body expression creates non-module context objectspublic <T,E extends Throwable> T accept(ExpressionVisitor<T,E> visitor) throws E extends Throwable
Expressionaccept in class ExpressionEE extends Throwableprotected Object basicInterpret(Interpreter interpreter, InterpreterStackTrace stackTrace)
ExpressionbasicInterpret in class ExpressionCopyright © 2007-2018 Whitestein Technologies. All Rights Reserved.