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 Object implements ISymbol
-
-
Constructor Summary
Constructors Constructor Description MemberFieldSymbol(int index, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBeCaptured()
IReducedSymbol
createReducedSymbol()
List<IGosuAnnotation>
getAnnotations()
IExpression
getDefaultValueExpression()
The symbol's default value e.g., a default parameter value for a function.String
getDisplayName()
Returns the Symbol's optional display name.ISymbolTable
getDynamicSymbolTable()
String
getFullDescription()
IGosuClass
getGosuClass()
int
getIndex()
ISymbol
getLightWeightReference()
Creates a copy of this symbol without the value so that the empty symbol can be stored.IModifierInfo
getModifierInfo()
int
getModifiers()
String
getName()
Returns the Symbol's name.IScriptPartId
getScriptPart()
Class
getSymbolClass()
IType
getType()
Returns the Symbol's type.Object
getValue()
Returns the value assigned to this Symbol.boolean
hasDynamicSymbolTable()
boolean
hasTypeVariables()
boolean
isAbstract()
boolean
isFinal()
boolean
isInternal()
boolean
isLocal()
boolean
isPrivate()
boolean
isProtected()
boolean
isPublic()
boolean
isReified()
boolean
isStatic()
boolean
isValueBoxed()
boolean
isWritable()
Returns true if this symbol is writable.ICapturedSymbol
makeCapturedSymbol(String strName, ISymbolTable symbolTable, IScope scope)
void
setDefaultValueExpression(IExpression defaultValue)
void
setDynamicSymbolTable(ISymbolTable symTable)
Assigns an optional symbol table so that the symbol can get/set its value dynamically e.g., via ThreadLocalSymbolTable.void
setIndex(int iIndex)
void
setType(IType type)
Sets the Symbol's type.void
setValue(Object value)
Assigns a value to this Symbol.void
setValueIsBoxed(boolean b)
Indicates that this symbol should use a reference rather than storing its value directly.
-
-
-
Constructor Detail
-
MemberFieldSymbol
public MemberFieldSymbol(int index, String name)
-
-
Method Detail
-
getIndex
public int getIndex()
- Specified by:
getIndex
in interfaceIReducedSymbol
- Specified by:
getIndex
in interfaceISymbol
-
setIndex
public void setIndex(int iIndex)
-
canBeCaptured
public boolean canBeCaptured()
- Specified by:
canBeCaptured
in interfaceISymbol
-
makeCapturedSymbol
public ICapturedSymbol makeCapturedSymbol(String strName, ISymbolTable symbolTable, IScope scope)
- Specified by:
makeCapturedSymbol
in interfaceISymbol
-
isStatic
public boolean isStatic()
- Specified by:
isStatic
in interfaceIReducedSymbol
-
getModifiers
public int getModifiers()
- Specified by:
getModifiers
in interfaceIReducedSymbol
-
getAnnotations
public List<IGosuAnnotation> getAnnotations()
- Specified by:
getAnnotations
in interfaceIReducedSymbol
-
getName
public String getName()
Description copied from interface:ISymbol
Returns the Symbol's name.- Specified by:
getName
in interfaceIReducedSymbol
- Specified by:
getName
in interfaceISymbol
-
getDisplayName
public String getDisplayName()
Description copied from interface:ISymbol
Returns the Symbol's optional display name. If a display name is not assigned, returns the symbol's name.- Specified by:
getDisplayName
in interfaceIReducedSymbol
- Specified by:
getDisplayName
in interfaceISymbol
-
getFullDescription
public String getFullDescription()
- Specified by:
getFullDescription
in interfaceIReducedSymbol
-
isPrivate
public boolean isPrivate()
- Specified by:
isPrivate
in interfaceIReducedSymbol
-
isInternal
public boolean isInternal()
- Specified by:
isInternal
in interfaceIReducedSymbol
-
isProtected
public boolean isProtected()
- Specified by:
isProtected
in interfaceIReducedSymbol
-
isPublic
public boolean isPublic()
- Specified by:
isPublic
in interfaceIReducedSymbol
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in interfaceIReducedSymbol
-
isFinal
public boolean isFinal()
- Specified by:
isFinal
in interfaceIReducedSymbol
-
isReified
public boolean isReified()
- Specified by:
isReified
in interfaceIReducedSymbol
-
getScriptPart
public IScriptPartId getScriptPart()
- Specified by:
getScriptPart
in interfaceIReducedSymbol
-
getGosuClass
public IGosuClass getGosuClass()
- Specified by:
getGosuClass
in interfaceIReducedSymbol
-
hasTypeVariables
public boolean hasTypeVariables()
- Specified by:
hasTypeVariables
in interfaceIReducedSymbol
-
getSymbolClass
public Class getSymbolClass()
- Specified by:
getSymbolClass
in interfaceIReducedSymbol
-
getType
public IType getType()
Description copied from interface:ISymbol
Returns the Symbol's type.
-
setType
public void setType(IType type)
Description copied from interface:ISymbol
Sets the Symbol's type.
-
getValue
public Object getValue()
Description copied from interface:ISymbol
Returns the value assigned to this Symbol.
-
setValue
public void setValue(Object value)
Description copied from interface:ISymbol
Assigns a value to this Symbol.
-
getDefaultValueExpression
public IExpression getDefaultValueExpression()
Description copied from interface:ISymbol
The symbol's default value e.g., a default parameter value for a function.- Specified by:
getDefaultValueExpression
in interfaceIReducedSymbol
- Specified by:
getDefaultValueExpression
in interfaceISymbol
-
setDefaultValueExpression
public void setDefaultValueExpression(IExpression defaultValue)
- Specified by:
setDefaultValueExpression
in interfaceISymbol
-
setDynamicSymbolTable
public void setDynamicSymbolTable(ISymbolTable symTable)
Description copied from interface:ISymbol
Assigns an optional symbol table so that the symbol can get/set its value dynamically e.g., via ThreadLocalSymbolTable.- Specified by:
setDynamicSymbolTable
in interfaceISymbol
-
hasDynamicSymbolTable
public boolean hasDynamicSymbolTable()
- Specified by:
hasDynamicSymbolTable
in interfaceISymbol
-
getDynamicSymbolTable
public ISymbolTable getDynamicSymbolTable()
- Specified by:
getDynamicSymbolTable
in interfaceISymbol
-
getLightWeightReference
public ISymbol getLightWeightReference()
Description copied from interface:ISymbol
Creates a copy of this symbol without the value so that the empty symbol can be stored.- Specified by:
getLightWeightReference
in interfaceISymbol
-
isWritable
public boolean isWritable()
Description copied from interface:ISymbol
Returns 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:
isWritable
in interfaceISymbol
-
setValueIsBoxed
public void setValueIsBoxed(boolean b)
Description copied from interface:ISymbol
Indicates that this symbol should use a reference rather than storing its value directly.- Specified by:
setValueIsBoxed
in interfaceISymbol
-
isValueBoxed
public boolean isValueBoxed()
- Specified by:
isValueBoxed
in interfaceIReducedSymbol
- Specified by:
isValueBoxed
in interfaceISymbol
-
getModifierInfo
public IModifierInfo getModifierInfo()
- Specified by:
getModifierInfo
in interfaceISymbol
-
createReducedSymbol
public IReducedSymbol createReducedSymbol()
- Specified by:
createReducedSymbol
in interfaceISymbol
-
-