Package gw.lang.parser
Interface ISymbol
-
- All Superinterfaces:
IHasType
,IReducedSymbol
- All Known Subinterfaces:
ICapturedSymbol
,IDynamicFunctionSymbol
,IDynamicPropertySymbol
,IDynamicSymbol
,IFunctionSymbol
,IInitConstructorFunctionSymbol
,IInitializerSymbol
,IInjectedSymbol
,INonCapturableSymbol
,IProgramClassFunctionSymbol
,ITypedSymbol
- All Known Implementing Classes:
AbstractDynamicSymbol
,AmbiguousSymbol
,CapturedSymbol
,CommonSymbolsScope.LockedDownSymbol
,CompileTimeExpressionParser.CompileTimeFieldSymbol
,DelegateFunctionSymbol
,DynamicFunctionSymbol
,DynamicPropertySymbol
,DynamicSymbol
,EnhancementDynamicFunctionSymbol
,EnumAllValuesFunctionSymbol
,EnumAllValuesPropertySymbol
,EnumCodeFunctionSymbol
,EnumCodePropertySymbol
,EnumDisplayNameFunctionSymbol
,EnumDisplayNamePropertySymbol
,EnumNameFunctionSymbol
,EnumNamePropertySymbol
,EnumOrdinalFunctionSymbol
,EnumOrdinalPropertySymbol
,EnumValueFunctionSymbol
,EnumValueOfFunctionSymbol
,EnumValuePropertySymbol
,EnumValuesFunctionSymbol
,GosuObjectFunctionSymbol
,InitConstructorFunctionSymbol
,InitializerSymbol
,IntrinsicTypeFunctionSymbol
,IntrinsicTypePropertySymbol
,MemberFieldSymbol
,OuterFunctionSymbol
,ParameterizedDynamicFunctionSymbol
,ParameterizedDynamicPropertySymbol
,ProgramClassFunctionSymbol
,ProgramExecuteFunctionSymbol
,QueryPathRootSymbol
,ReadOnlySymbol
,ReducedSymbol.SyntheticSymbol
,SuperConstructorFunctionSymbol
,Symbol
,TemplateGenerator.LockedDownSymbol
,TemplateRenderFunctionSymbol
,ThisConstructorFunctionSymbol
,ThisSymbol
,TypedSymbol
,VarPropertyGetFunctionSymbol
,VarPropertySetFunctionSymbol
public interface ISymbol extends IHasType, IReducedSymbol
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canBeCaptured()
IReducedSymbol
createReducedSymbol()
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()
int
getIndex()
ISymbol
getLightWeightReference()
Creates a copy of this symbol without the value so that the empty symbol can be stored.IModifierInfo
getModifierInfo()
String
getName()
Returns the Symbol's name.IType
getType()
Returns the Symbol's type.Object
getValue()
Returns the value assigned to this Symbol.boolean
hasDynamicSymbolTable()
boolean
isLocal()
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
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.-
Methods inherited from interface gw.lang.parser.IReducedSymbol
getAnnotations, getFullDescription, getGosuClass, getModifiers, getScriptPart, getSymbolClass, hasTypeVariables, isAbstract, isFinal, isInternal, isPrivate, isProtected, isPublic, isReified, isStatic
-
-
-
-
Method Detail
-
getName
String getName()
Returns the Symbol's name.- Specified by:
getName
in interfaceIReducedSymbol
-
getDisplayName
String getDisplayName()
Returns the Symbol's optional display name. If a display name is not assigned, returns the symbol's name.- Specified by:
getDisplayName
in interfaceIReducedSymbol
-
getType
IType getType()
Returns the Symbol's type.- Specified by:
getType
in interfaceIHasType
- Specified by:
getType
in interfaceIReducedSymbol
-
setType
void setType(IType type)
Sets the Symbol's type.
-
getValue
Object getValue()
Returns the value assigned to this Symbol.
-
setValue
void setValue(Object value)
Assigns a value to this Symbol.
-
getDefaultValueExpression
IExpression getDefaultValueExpression()
The symbol's default value e.g., a default parameter value for a function.- Specified by:
getDefaultValueExpression
in interfaceIReducedSymbol
-
setDefaultValueExpression
void setDefaultValueExpression(IExpression defaultValue)
-
setDynamicSymbolTable
void setDynamicSymbolTable(ISymbolTable symTable)
Assigns an optional symbol table so that the symbol can get/set its value dynamically e.g., via ThreadLocalSymbolTable.
-
hasDynamicSymbolTable
boolean hasDynamicSymbolTable()
-
getDynamicSymbolTable
ISymbolTable getDynamicSymbolTable()
-
getLightWeightReference
ISymbol getLightWeightReference()
Creates a copy of this symbol without the value so that the empty symbol can be stored.
-
isWritable
boolean isWritable()
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.
-
setValueIsBoxed
void setValueIsBoxed(boolean b)
Indicates that this symbol should use a reference rather than storing its value directly.
-
isValueBoxed
boolean isValueBoxed()
- Specified by:
isValueBoxed
in interfaceIReducedSymbol
-
getIndex
int getIndex()
- Specified by:
getIndex
in interfaceIReducedSymbol
-
canBeCaptured
boolean canBeCaptured()
-
makeCapturedSymbol
ICapturedSymbol makeCapturedSymbol(String strName, ISymbolTable symbolTable, IScope scope)
-
isLocal
boolean isLocal()
-
getModifierInfo
IModifierInfo getModifierInfo()
-
createReducedSymbol
IReducedSymbol createReducedSymbol()
-
-