public final class MethodExpression extends SignatureExpression
Constructor and Description |
---|
MethodExpression(ASTInfo astInfo,
Expression recordExpression,
ClosureType signatureType,
FunctionSignature signature,
boolean dynamicDispatch,
boolean isSuper)
Creates new instance of
MethodExpression . |
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.
|
Object |
execute(Interpreter interpreter,
List<?> args,
InterpreterStackTrace stackTrace)
Executes the method call.
|
FunctionSignature |
getFunctionSignature()
Returns the function signature.
|
Expression |
getRecordExpression()
Returns the record expression.
|
ClosureType |
getType()
Returns the return type.
|
boolean |
isDynamicDispatch()
Returns a flag specifying that a dynamic dispatch is required.
|
boolean |
isSuper()
Returns
true if the method is a "super" call. |
getOperation
createANTLRParser, doInterpret, evalCondition, evaluateToExpressions, executeCompiled, getCompiled, getDebugLine, getIdentifierAst, getParseTimeConstant, getPrimaryRange, getPropertySelectorRange, getRange, getResultExpression, getResultExpressions, interpret, interpretInCurrentNamespace, isCreatingNonModuleContextObjects, isParseTimeConstant, requiresNewNamespace, setCompiled, showInFullText, showInSurroundingText, showInText, toExpressions
getFullText, getLine, getNodeText, getText, toString
contains, getBeginIndex, getEndIndex, getLength
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFullText, getLine, getNodeText, getText
contains, getBeginIndex, getEndIndex, getLength
public MethodExpression(ASTInfo astInfo, Expression recordExpression, ClosureType signatureType, FunctionSignature signature, boolean dynamicDispatch, boolean isSuper)
MethodExpression
.astInfo
- recordExpression
- signatureType
- signature
- dynamicDispatch
- a flag specifying that a dynamic dispatch is required
(for private methods and "super" methods call dynamicDispatch is false)isSuper
- NullPointerException
- if recordExpression
or property
is null or recordType
is nullpublic ClosureType getType()
Expression
getType
in class Expression
public <T,E extends Throwable> T accept(ExpressionVisitor<T,E> visitor) throws E extends Throwable
Expression
accept
in class Expression
E
E extends Throwable
public Expression getRecordExpression()
public boolean isDynamicDispatch()
For private methods and "super" methods call dynamicDispatch is false.
public boolean isSuper()
true
if the method is a "super" call.true
if the method is a "super" callprotected Object basicInterpret(Interpreter interpreter, InterpreterStackTrace stackTrace) throws ErrorException
Expression
basicInterpret
in class Expression
ErrorException
public Object execute(Interpreter interpreter, List<?> args, InterpreterStackTrace stackTrace) throws ErrorException
interpreter
- args
- stackTrace
- ErrorException
public FunctionSignature getFunctionSignature()
SignatureExpression
getFunctionSignature
in class SignatureExpression
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.