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:
IGosuParser
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String_accessPathprivate Expression[]_argsprivate IType[]_argTypesprivate IExpressionRuntime_expressionRuntimeprivate IFunctionType_funcTypeprivate int_iArgPosprivate MemberAccessKind_kindprivate IMethodInfo_mdprivate int[]_namedArgOrderprivate int_opLineNumprivate Expression_rootExpressionprotected int_startOffsetStart offset of array list (without leading '.')private static IType[]EMPTY_ARG_TYPES-
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 Constructor Description BeanMethodCallExpression()
-
Method Summary
-
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 Detail
-
_rootExpression
private Expression _rootExpression
-
_argTypes
private IType[] _argTypes
-
_accessPath
private java.lang.String _accessPath
-
_args
private Expression[] _args
-
_md
private IMethodInfo _md
-
_funcType
private IFunctionType _funcType
-
_kind
private MemberAccessKind _kind
-
_namedArgOrder
private int[] _namedArgOrder
-
_iArgPos
private int _iArgPos
-
_startOffset
protected int _startOffset
Start offset of array list (without leading '.')
-
EMPTY_ARG_TYPES
private static final IType[] EMPTY_ARG_TYPES
-
_expressionRuntime
private IExpressionRuntime _expressionRuntime
-
_opLineNum
private int _opLineNum
-
-
Method Detail
-
getFunctionType
public IFunctionType getFunctionType()
- Specified by:
getFunctionTypein interfaceIBeanMethodCallExpression
-
setFunctionType
public void setFunctionType(IFunctionType funcType)
-
getRootExpression
public Expression getRootExpression()
- Specified by:
getRootExpressionin interfaceIMemberAccessExpression
-
setRootExpression
public void setRootExpression(Expression rootExpression)
-
getArgTypes
public IType[] getArgTypes()
- Specified by:
getArgTypesin interfaceIBeanMethodCallExpression- Returns:
- An array of IIntrinsicITyperguments of the method call.
-
setArgTypes
public void setArgTypes(IType[] argTypes)
- Parameters:
argTypes- An array of IIntrinsicType for the arguments of the method call.
-
getMemberName
public java.lang.String 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
public void setAccessPath(java.lang.String accessPath)
- Parameters:
accessPath- A list of Strings representing the member access path.
-
getAccessPath
public java.lang.String getAccessPath()
-
getStartOffset
public int getStartOffset()
- Specified by:
getStartOffsetin interfaceIMemberAccessExpression
-
setExpressionRuntime
public void setExpressionRuntime(IExpressionRuntime expressionRuntime)
- Specified by:
setExpressionRuntimein interfaceIMemberAccessExpression
-
getPropertyInfo
public IPropertyInfo getPropertyInfo()
- Specified by:
getPropertyInfoin interfaceIMemberAccessExpression
-
getExpressionRuntime
public IExpressionRuntime getExpressionRuntime()
- Specified by:
getExpressionRuntimein interfaceIMemberAccessExpression
-
setStartOffset
public void setStartOffset(int startOffset)
- Specified by:
setStartOffsetin interfaceIMemberAccessExpression
-
getArgs
public Expression[] getArgs()
- Specified by:
getArgsin interfaceIBeanMethodCallExpression- Specified by:
getArgsin interfaceIHasArguments- Returns:
- An array of expressions for corresponding to the arguments in the expression.
-
setArgs
public void setArgs(Expression[] args)
- 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
public void setMethodDescriptor(IMethodInfo md)
-
getMethodDescriptor
public IMethodInfo getMethodDescriptor()
- Specified by:
getMethodDescriptorin interfaceIBeanMethodCallExpression
-
getGenericMethodDescriptor
public IMethodInfo getGenericMethodDescriptor()
- Specified by:
getGenericMethodDescriptorin interfaceIBeanMethodCallExpression
-
getRootType
public IType getRootType()
- Specified by:
getRootTypein interfaceIMemberAccessExpression
-
getMemberAccessKind
public MemberAccessKind getMemberAccessKind()
-
setMemberAccessKind
public void setMemberAccessKind(MemberAccessKind kind)
-
isNullSafe
public boolean isNullSafe()
- Specified by:
isNullSafein interfaceIExpression- Overrides:
isNullSafein classExpression
-
isExpansion
public boolean isExpansion()
-
evaluate
public java.lang.Object evaluate()
Evaluates the bean method call.- Specified by:
evaluatein interfaceIExpression- Overrides:
evaluatein classExpression- Returns:
- The value of the expression.
-
toString
public java.lang.String 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
-
-