Class BeanMethodCallExpression
java.lang.Object
gw.internal.gosu.parser.ParsedElement
gw.internal.gosu.parser.Expression
gw.internal.gosu.parser.expressions.BeanMethodCallExpression
- All Implemented Interfaces:
IHasOperatorLineNumber
,IBeanMethodCallExpression
,IMemberAccessExpression
,IExpression
,IHasArguments
,IHasType
,IParsedElement
public final class BeanMethodCallExpression
extends Expression
implements IBeanMethodCallExpression, IHasOperatorLineNumber
An expression representing a bean method call:
bean-method-call-expression <member-access> ( [<argument-list>] ) member-access <root-expression>.<member> <root-expression>*.<member> <root-expression>[member-name] root-expression <bean-reference> <type-literal> member <member-access> <identifier> bean-reference <primary-expression> member-name <expression>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private Expression[]
private IType[]
private IExpressionRuntime
private IFunctionType
private int
private MemberAccessKind
private IMethodInfo
private int[]
private int
private Expression
protected int
Start offset of array list (without leading '.')private static final IType[]
Fields inherited from class gw.internal.gosu.parser.Expression
_type
Fields inherited from class gw.internal.gosu.parser.ParsedElement
_tokens, UNDEF_FILE, UNDEF_FUNCTION, UNDEF_MODULE
Fields inherited from interface gw.lang.parser.IExpression
EMPTY_ARRAY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate()
Evaluates the bean method call.int
getArgs()
IType[]
int[]
int
int
boolean
boolean
void
setAccessPath
(String accessPath) void
setArgPosition
(int iArgPos) void
setArgs
(Expression[] args) void
setArgTypes
(IType[] argTypes) void
setExpressionRuntime
(IExpressionRuntime expressionRuntime) void
setFunctionType
(IFunctionType funcType) void
void
void
setNamedArgOrder
(int[] namedArgOrder) void
setOperatorLineNumber
(int operatorLineNumber) void
setRootExpression
(Expression rootExpression) void
setStartOffset
(int startOffset) toString()
Subclasses should return a String representing the parsed expression.Methods inherited from class gw.internal.gosu.parser.Expression
evaluate, getContextType, getReturnType, getType, getTypeImpl, isUnchecked, setType
Methods inherited from class gw.internal.gosu.parser.ParsedElement
addExceptionsFrom, addParseException, addParseException, addParseException, addParseExceptions, addParseIssues, addParseWarning, addParseWarning, addParseWarnings, addToken, adjustColumn, adjustLineNum, assignTokens, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, compactParseTree, findAncestorParsedElementByType, findDeclaringStatement, findLineNumberOfDeclaration, findRootParsedElement, getAnnotations, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getEnclosingFeatureInfo, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getQualifyingEnclosingTypeInfo, getTokens, hasImmediateParseIssue, hasImmediateParseWarning, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, initEmptyParseTree, initLocation, isCompileTimeConstant, isSuppressed, isSuppressed, isSynthetic, makeDoubleValue, makeFloatValue, makeInteger, makeLong, removeParseException, removeParseWarning, removeParseWarningRecursively, setGosuProgram, setLineNum, setLocation, setParent, setSynthetic, shouldClearParseInfo, visit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface gw.lang.parser.IExpression
evaluate, getContextType, isUnchecked
Methods inherited from interface gw.lang.parser.IParsedElement
addExceptionsFrom, addParseException, addParseException, addParseWarning, addParseWarning, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, findAncestorParsedElementByType, findDeclaringStatement, findRootParsedElement, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getReturnType, getTokens, hasImmediateParseIssue, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, isCompileTimeConstant, isSuppressed, isSynthetic, setLocation, setParent, visit
-
Field Details
-
_rootExpression
-
_argTypes
-
_accessPath
-
_args
-
_md
-
_funcType
-
_kind
-
_namedArgOrder
private int[] _namedArgOrder -
_iArgPos
private int _iArgPos -
_startOffset
protected int _startOffsetStart offset of array list (without leading '.') -
EMPTY_ARG_TYPES
-
_expressionRuntime
-
_opLineNum
private int _opLineNum
-
-
Constructor Details
-
BeanMethodCallExpression
public BeanMethodCallExpression()
-
-
Method Details
-
getFunctionType
- Specified by:
getFunctionType
in interfaceIBeanMethodCallExpression
-
setFunctionType
-
getRootExpression
- Specified by:
getRootExpression
in interfaceIMemberAccessExpression
-
setRootExpression
-
getArgTypes
- Specified by:
getArgTypes
in interfaceIBeanMethodCallExpression
- Returns:
- An array of IIntrinsicITyperguments of the method call.
-
setArgTypes
- Parameters:
argTypes
- An array of IIntrinsicType for the arguments of the method call.
-
getMemberName
- Specified by:
getMemberName
in interfaceIMemberAccessExpression
- Returns:
- A list of Strings representing the member access path. Note the member access path for the expression Root.foo.bar() is {foo, bar}.
-
setAccessPath
- Parameters:
accessPath
- A list of Strings representing the member access path.
-
getAccessPath
-
getStartOffset
public int getStartOffset()- Specified by:
getStartOffset
in interfaceIMemberAccessExpression
-
setExpressionRuntime
- Specified by:
setExpressionRuntime
in interfaceIMemberAccessExpression
-
getPropertyInfo
- Specified by:
getPropertyInfo
in interfaceIMemberAccessExpression
-
getExpressionRuntime
- Specified by:
getExpressionRuntime
in interfaceIMemberAccessExpression
-
setStartOffset
public void setStartOffset(int startOffset) - Specified by:
setStartOffset
in interfaceIMemberAccessExpression
-
getArgs
- Specified by:
getArgs
in interfaceIBeanMethodCallExpression
- Specified by:
getArgs
in interfaceIHasArguments
- Returns:
- An array of expressions for corresponding to the arguments in the expression.
-
setArgs
- Parameters:
args
- An array of expressions for corresponding to the arguments in the expression.
-
getNamedArgOrder
public int[] getNamedArgOrder() -
setNamedArgOrder
public void setNamedArgOrder(int[] namedArgOrder) -
setMethodDescriptor
-
getMethodDescriptor
- Specified by:
getMethodDescriptor
in interfaceIBeanMethodCallExpression
-
getGenericMethodDescriptor
- Specified by:
getGenericMethodDescriptor
in interfaceIBeanMethodCallExpression
-
getRootType
- Specified by:
getRootType
in interfaceIMemberAccessExpression
-
getMemberAccessKind
-
setMemberAccessKind
-
isNullSafe
public boolean isNullSafe()- Specified by:
isNullSafe
in interfaceIExpression
- Overrides:
isNullSafe
in classExpression
-
isExpansion
public boolean isExpansion() -
evaluate
Evaluates the bean method call.- Specified by:
evaluate
in interfaceIExpression
- Overrides:
evaluate
in classExpression
- Returns:
- The value of the expression.
-
toString
Description copied from class:Expression
Subclasses should return a String representing the parsed expression.- Specified by:
toString
in classExpression
-
getArgPosition
public int getArgPosition()- Specified by:
getArgPosition
in interfaceIHasArguments
-
setArgPosition
public void setArgPosition(int iArgPos) -
getOperatorLineNumber
public int getOperatorLineNumber()- Specified by:
getOperatorLineNumber
in interfaceIHasOperatorLineNumber
-
setOperatorLineNumber
public void setOperatorLineNumber(int operatorLineNumber) - Specified by:
setOperatorLineNumber
in interfaceIHasOperatorLineNumber
-