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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IExpressionRuntimeprivate MemberAccessKindprivate ExpressionAn expression for accessing a member by name dynamicallyprivate intprivate ExpressionThe root expression in the path (instead of a root bean symbol)private intStart offset of array list (without leading '.')private StringThe member name.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 this Expression and returns the result.intintbooleanbooleanvoidsetExpressionRuntime(IExpressionRuntime expressionRuntime) voidvoidsetMemberExpression(Expression memberExpression) voidsetMemberName(String strMemberName) 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, 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, isSuppressed, isSynthetic, setLocation, setParent, visit
-
Field Details
-
_rootExpression
The root expression in the path (instead of a root bean symbol) -
_strMemberName
The member name. -
_startOffset
private int _startOffsetStart offset of array list (without leading '.') -
_memberExpression
An expression for accessing a member by name dynamically -
_expressionRuntime
-
_kind
-
_opLineNum
private int _opLineNum
-
-
Constructor Details
-
MemberAccess
public MemberAccess()
-
-
Method Details
-
getRootExpression
- Specified by:
getRootExpressionin interfaceIMemberAccessExpression
-
evaluateRootExpr
-
setRootExpression
-
getMemberName
- Specified by:
getMemberNamein interfaceIMemberAccessExpression
-
setMemberName
-
getStartOffset
public int getStartOffset()- Specified by:
getStartOffsetin interfaceIMemberAccessExpression
-
setStartOffset
public void setStartOffset(int startOffset) - Specified by:
setStartOffsetin interfaceIMemberAccessExpression
-
getMemberExpression
- Specified by:
getMemberExpressionin interfaceIFieldAccessExpression
-
setMemberExpression
-
getRootType
- Specified by:
getRootTypein interfaceIMemberAccessExpression
-
getAssignableType
-
getPropertyInfo
- Specified by:
getPropertyInfoin interfaceIFieldAccessExpression- Specified by:
getPropertyInfoin interfaceIMemberAccessExpression
-
getPropertyInfoWithoutThrowing
-
isCompileTimeConstant
public boolean isCompileTimeConstant()- Specified by:
isCompileTimeConstantin interfaceIParsedElement- Overrides:
isCompileTimeConstantin classParsedElement
-
evaluate
Description copied from interface:IExpressionEvaluates this Expression and returns the result.- Specified by:
evaluatein interfaceIExpression- Overrides:
evaluatein classExpression
-
getCompileTimePropertyInfo
-
setExpressionRuntime
- Specified by:
setExpressionRuntimein interfaceIMemberAccessExpression
-
getExpressionRuntime
- Specified by:
getExpressionRuntimein interfaceIMemberAccessExpression
-
getMemberAccessKind
-
setMemberAccessKind
-
isNullSafe
public boolean isNullSafe()- Specified by:
isNullSafein interfaceIExpression- Overrides:
isNullSafein classExpression
-
toString
Description copied from class:ExpressionSubclasses should return a String representing the parsed expression.- Specified by:
toStringin classExpression
-
getOperatorLineNumber
public int getOperatorLineNumber()- Specified by:
getOperatorLineNumberin interfaceIHasOperatorLineNumber
-
setOperatorLineNumber
public void setOperatorLineNumber(int operatorLineNumber) - Specified by:
setOperatorLineNumberin interfaceIHasOperatorLineNumber
-