Package gw.internal.gosu.parser
Class MemberFieldSymbol
- java.lang.Object
-
- gw.internal.gosu.parser.MemberFieldSymbol
-
- All Implemented Interfaces:
IHasType,IReducedSymbol,ISymbol
public class MemberFieldSymbol extends java.lang.Object implements ISymbol
-
-
Constructor Summary
Constructors Constructor Description MemberFieldSymbol(int index, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanBeCaptured()IReducedSymbolcreateReducedSymbol()java.util.List<IGosuAnnotation>getAnnotations()IExpressiongetDefaultValueExpression()The symbol's default value e.g., a default parameter value for a function.java.lang.StringgetDisplayName()Returns the Symbol's optional display name.ISymbolTablegetDynamicSymbolTable()java.lang.StringgetFullDescription()IGosuClassgetGosuClass()intgetIndex()ISymbolgetLightWeightReference()Creates a copy of this symbol without the value so that the empty symbol can be stored.IModifierInfogetModifierInfo()intgetModifiers()java.lang.StringgetName()Returns the Symbol's name.IScriptPartIdgetScriptPart()java.lang.ClassgetSymbolClass()ITypegetType()Returns the Symbol's type.java.lang.ObjectgetValue()Returns the value assigned to this Symbol.booleanhasDynamicSymbolTable()booleanhasTypeVariables()booleanisAbstract()booleanisFinal()booleanisInternal()booleanisLocal()booleanisPrivate()booleanisProtected()booleanisPublic()booleanisReified()booleanisStatic()booleanisValueBoxed()booleanisWritable()Returns true if this symbol is writable.ICapturedSymbolmakeCapturedSymbol(java.lang.String strName, ISymbolTable symbolTable, IScope scope)voidsetDefaultValueExpression(IExpression defaultValue)voidsetDynamicSymbolTable(ISymbolTable symTable)Assigns an optional symbol table so that the symbol can get/set its value dynamically e.g., via ThreadLocalSymbolTable.voidsetIndex(int iIndex)voidsetType(IType type)Sets the Symbol's type.voidsetValue(java.lang.Object value)Assigns a value to this Symbol.voidsetValueIsBoxed(boolean b)Indicates that this symbol should use a reference rather than storing its value directly.
-
-
-
Method Detail
-
getIndex
public int getIndex()
- Specified by:
getIndexin interfaceIReducedSymbol- Specified by:
getIndexin interfaceISymbol
-
setIndex
public void setIndex(int iIndex)
-
canBeCaptured
public boolean canBeCaptured()
- Specified by:
canBeCapturedin interfaceISymbol
-
makeCapturedSymbol
public ICapturedSymbol makeCapturedSymbol(java.lang.String strName, ISymbolTable symbolTable, IScope scope)
- Specified by:
makeCapturedSymbolin interfaceISymbol
-
isStatic
public boolean isStatic()
- Specified by:
isStaticin interfaceIReducedSymbol
-
getModifiers
public int getModifiers()
- Specified by:
getModifiersin interfaceIReducedSymbol
-
getAnnotations
public java.util.List<IGosuAnnotation> getAnnotations()
- Specified by:
getAnnotationsin interfaceIReducedSymbol
-
getName
public java.lang.String getName()
Description copied from interface:ISymbolReturns the Symbol's name.- Specified by:
getNamein interfaceIReducedSymbol- Specified by:
getNamein interfaceISymbol
-
getDisplayName
public java.lang.String getDisplayName()
Description copied from interface:ISymbolReturns the Symbol's optional display name. If a display name is not assigned, returns the symbol's name.- Specified by:
getDisplayNamein interfaceIReducedSymbol- Specified by:
getDisplayNamein interfaceISymbol
-
getFullDescription
public java.lang.String getFullDescription()
- Specified by:
getFullDescriptionin interfaceIReducedSymbol
-
isPrivate
public boolean isPrivate()
- Specified by:
isPrivatein interfaceIReducedSymbol
-
isInternal
public boolean isInternal()
- Specified by:
isInternalin interfaceIReducedSymbol
-
isProtected
public boolean isProtected()
- Specified by:
isProtectedin interfaceIReducedSymbol
-
isPublic
public boolean isPublic()
- Specified by:
isPublicin interfaceIReducedSymbol
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstractin interfaceIReducedSymbol
-
isFinal
public boolean isFinal()
- Specified by:
isFinalin interfaceIReducedSymbol
-
isReified
public boolean isReified()
- Specified by:
isReifiedin interfaceIReducedSymbol
-
getScriptPart
public IScriptPartId getScriptPart()
- Specified by:
getScriptPartin interfaceIReducedSymbol
-
getGosuClass
public IGosuClass getGosuClass()
- Specified by:
getGosuClassin interfaceIReducedSymbol
-
hasTypeVariables
public boolean hasTypeVariables()
- Specified by:
hasTypeVariablesin interfaceIReducedSymbol
-
getSymbolClass
public java.lang.Class getSymbolClass()
- Specified by:
getSymbolClassin interfaceIReducedSymbol
-
getType
public IType getType()
Description copied from interface:ISymbolReturns the Symbol's type.
-
setType
public void setType(IType type)
Description copied from interface:ISymbolSets the Symbol's type.
-
getValue
public java.lang.Object getValue()
Description copied from interface:ISymbolReturns the value assigned to this Symbol.
-
setValue
public void setValue(java.lang.Object value)
Description copied from interface:ISymbolAssigns a value to this Symbol.
-
getDefaultValueExpression
public IExpression getDefaultValueExpression()
Description copied from interface:ISymbolThe symbol's default value e.g., a default parameter value for a function.- Specified by:
getDefaultValueExpressionin interfaceIReducedSymbol- Specified by:
getDefaultValueExpressionin interfaceISymbol
-
setDefaultValueExpression
public void setDefaultValueExpression(IExpression defaultValue)
- Specified by:
setDefaultValueExpressionin interfaceISymbol
-
setDynamicSymbolTable
public void setDynamicSymbolTable(ISymbolTable symTable)
Description copied from interface:ISymbolAssigns an optional symbol table so that the symbol can get/set its value dynamically e.g., via ThreadLocalSymbolTable.- Specified by:
setDynamicSymbolTablein interfaceISymbol
-
hasDynamicSymbolTable
public boolean hasDynamicSymbolTable()
- Specified by:
hasDynamicSymbolTablein interfaceISymbol
-
getDynamicSymbolTable
public ISymbolTable getDynamicSymbolTable()
- Specified by:
getDynamicSymbolTablein interfaceISymbol
-
getLightWeightReference
public ISymbol getLightWeightReference()
Description copied from interface:ISymbolCreates a copy of this symbol without the value so that the empty symbol can be stored.- Specified by:
getLightWeightReferencein interfaceISymbol
-
isWritable
public boolean isWritable()
Description copied from interface:ISymbolReturns true if this symbol is writable. An example of a symbol that is not writable is a readonly Property referenced as a symbol in a Gosu class.- Specified by:
isWritablein interfaceISymbol
-
setValueIsBoxed
public void setValueIsBoxed(boolean b)
Description copied from interface:ISymbolIndicates that this symbol should use a reference rather than storing its value directly.- Specified by:
setValueIsBoxedin interfaceISymbol
-
isValueBoxed
public boolean isValueBoxed()
- Specified by:
isValueBoxedin interfaceIReducedSymbol- Specified by:
isValueBoxedin interfaceISymbol
-
getModifierInfo
public IModifierInfo getModifierInfo()
- Specified by:
getModifierInfoin interfaceISymbol
-
createReducedSymbol
public IReducedSymbol createReducedSymbol()
- Specified by:
createReducedSymbolin interfaceISymbol
-
-