Class MemberAccess
- java.lang.Object
-
- gw.internal.gosu.parser.ParsedElement
-
- gw.internal.gosu.parser.Expression
-
- gw.internal.gosu.parser.expressions.MemberAccess
-
- All Implemented Interfaces:
IHasOperatorLineNumber
,IFieldAccessExpression
,IMemberAccessExpression
,IExpression
,IHasType
,IParsedElement
- Direct Known Subclasses:
MemberExpansionAccess
,SynthesizedMemberAccess
,UnqualifiedEnumMemberAccess
public class MemberAccess extends Expression implements IFieldAccessExpression, IHasOperatorLineNumber
Represents a member access expression in the Gosu grammar:member-access <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 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 MemberAccess()
-
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, 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, isSuppressed, isSynthetic, setLocation, setParent, visit
-
-
-
-
Method Detail
-
getRootExpression
public Expression getRootExpression()
- Specified by:
getRootExpression
in interfaceIMemberAccessExpression
-
evaluateRootExpr
public Object evaluateRootExpr()
-
setRootExpression
public void setRootExpression(Expression rootExpression)
-
getMemberName
public String getMemberName()
- Specified by:
getMemberName
in interfaceIMemberAccessExpression
-
setMemberName
public void setMemberName(String strMemberName)
-
getStartOffset
public int getStartOffset()
- Specified by:
getStartOffset
in interfaceIMemberAccessExpression
-
setStartOffset
public void setStartOffset(int startOffset)
- Specified by:
setStartOffset
in interfaceIMemberAccessExpression
-
getMemberExpression
public Expression getMemberExpression()
- Specified by:
getMemberExpression
in interfaceIFieldAccessExpression
-
setMemberExpression
public void setMemberExpression(Expression memberExpression)
-
getRootType
public IType getRootType()
- Specified by:
getRootType
in interfaceIMemberAccessExpression
-
getAssignableType
public IType getAssignableType()
-
getPropertyInfo
public IPropertyInfo getPropertyInfo()
- Specified by:
getPropertyInfo
in interfaceIFieldAccessExpression
- Specified by:
getPropertyInfo
in interfaceIMemberAccessExpression
-
getPropertyInfoWithoutThrowing
public IPropertyInfo getPropertyInfoWithoutThrowing()
-
isCompileTimeConstant
public boolean isCompileTimeConstant()
- Specified by:
isCompileTimeConstant
in interfaceIParsedElement
- Overrides:
isCompileTimeConstant
in classParsedElement
-
evaluate
public Object evaluate()
Description copied from interface:IExpression
Evaluates this Expression and returns the result.- Specified by:
evaluate
in interfaceIExpression
- Overrides:
evaluate
in classExpression
-
getCompileTimePropertyInfo
public IPropertyInfo getCompileTimePropertyInfo()
-
setExpressionRuntime
public void setExpressionRuntime(IExpressionRuntime expressionRuntime)
- Specified by:
setExpressionRuntime
in interfaceIMemberAccessExpression
-
getExpressionRuntime
public IExpressionRuntime getExpressionRuntime()
- Specified by:
getExpressionRuntime
in interfaceIMemberAccessExpression
-
getMemberAccessKind
public MemberAccessKind getMemberAccessKind()
-
setMemberAccessKind
public void setMemberAccessKind(MemberAccessKind kind)
-
isNullSafe
public boolean isNullSafe()
- Specified by:
isNullSafe
in interfaceIExpression
- Overrides:
isNullSafe
in classExpression
-
toString
public String toString()
Description copied from class:Expression
Subclasses should return a String representing the parsed expression.- Specified by:
toString
in classExpression
-
getOperatorLineNumber
public int getOperatorLineNumber()
- Specified by:
getOperatorLineNumber
in interfaceIHasOperatorLineNumber
-
setOperatorLineNumber
public void setOperatorLineNumber(int operatorLineNumber)
- Specified by:
setOperatorLineNumber
in interfaceIHasOperatorLineNumber
-
-