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 Stringprivate Expression[]private IType[]private IExpressionRuntimeprivate IFunctionTypeprivate intprivate MemberAccessKindprivate IMethodInfoprivate int[]private intprivate Expressionprotected intStart offset of array list (without leading '.')private static final IType[]Fields inherited from class gw.internal.gosu.parser.Expression
_typeFields inherited from class gw.internal.gosu.parser.ParsedElement
_tokens, UNDEF_FILE, UNDEF_FUNCTION, UNDEF_MODULEFields inherited from interface gw.lang.parser.IExpression
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate()Evaluates the bean method call.intgetArgs()IType[]int[]intintbooleanbooleanvoidsetAccessPath(String accessPath) voidsetArgPosition(int iArgPos) voidsetArgs(Expression[] args) voidsetArgTypes(IType[] argTypes) voidsetExpressionRuntime(IExpressionRuntime expressionRuntime) voidsetFunctionType(IFunctionType funcType) voidvoidvoidsetNamedArgOrder(int[] namedArgOrder) voidsetOperatorLineNumber(int operatorLineNumber) voidsetRootExpression(Expression rootExpression) voidsetStartOffset(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, setTypeMethods 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, visitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gw.lang.parser.IExpression
evaluate, getContextType, isUncheckedMethods 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:
getFunctionTypein interfaceIBeanMethodCallExpression
-
setFunctionType
-
getRootExpression
- Specified by:
getRootExpressionin interfaceIMemberAccessExpression
-
setRootExpression
-
getArgTypes
- Specified by:
getArgTypesin 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:
getMemberNamein 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:
getStartOffsetin interfaceIMemberAccessExpression
-
setExpressionRuntime
- Specified by:
setExpressionRuntimein interfaceIMemberAccessExpression
-
getPropertyInfo
- Specified by:
getPropertyInfoin interfaceIMemberAccessExpression
-
getExpressionRuntime
- Specified by:
getExpressionRuntimein interfaceIMemberAccessExpression
-
setStartOffset
public void setStartOffset(int startOffset) - Specified by:
setStartOffsetin interfaceIMemberAccessExpression
-
getArgs
- Specified by:
getArgsin interfaceIBeanMethodCallExpression- Specified by:
getArgsin 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:
getMethodDescriptorin interfaceIBeanMethodCallExpression
-
getGenericMethodDescriptor
- Specified by:
getGenericMethodDescriptorin interfaceIBeanMethodCallExpression
-
getRootType
- Specified by:
getRootTypein interfaceIMemberAccessExpression
-
getMemberAccessKind
-
setMemberAccessKind
-
isNullSafe
public boolean isNullSafe()- Specified by:
isNullSafein interfaceIExpression- Overrides:
isNullSafein classExpression
-
isExpansion
public boolean isExpansion() -
evaluate
Evaluates the bean method call.- Specified by:
evaluatein interfaceIExpression- Overrides:
evaluatein classExpression- Returns:
- The value of the expression.
-
toString
Description copied from class:ExpressionSubclasses should return a String representing the parsed expression.- Specified by:
toStringin classExpression
-
getArgPosition
public int getArgPosition()- Specified by:
getArgPositionin interfaceIHasArguments
-
setArgPosition
public void setArgPosition(int iArgPos) -
getOperatorLineNumber
public int getOperatorLineNumber()- Specified by:
getOperatorLineNumberin interfaceIHasOperatorLineNumber
-
setOperatorLineNumber
public void setOperatorLineNumber(int operatorLineNumber) - Specified by:
setOperatorLineNumberin interfaceIHasOperatorLineNumber
-