Package gw.internal.gosu.parser
Class AbstractDynamicSymbol
java.lang.Object
gw.internal.gosu.parser.Symbol
gw.internal.gosu.parser.AbstractDynamicSymbol
- All Implemented Interfaces:
IDynamicSymbol
,IFunctionSymbol
,IHasType
,IReducedSymbol
,ISymbol
- Direct Known Subclasses:
DynamicFunctionSymbol
,DynamicPropertySymbol
,DynamicSymbol
public abstract class AbstractDynamicSymbol
extends Symbol
implements IDynamicSymbol, IReducedSymbol
-
Field Summary
FieldsFields inherited from class gw.internal.gosu.parser.Symbol
_bGlobal, _iIndex, _stackProvider, _symbolTable, _value, MEMBER_STACK_PROVIDER
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractDynamicSymbol
(ISymbolTable symTable, CharSequence strName, IType type) Constructs AbstractDynamicSymbol for use with an IGosuParser's ISymbolTable.AbstractDynamicSymbol
(ISymbolTable symTable, CharSequence strName, IType type, Object value) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
assignIndex
(IScope scope) void
(package private) Statement
abstract ISymbol
Creates a copy of this symbol without the value so that the empty symbol can be stored.abstract AbstractDynamicSymbol
getParameterizedVersion
(IGosuClass gsClass) boolean
boolean
boolean
boolean
isLocal()
void
setDynamicSymbolTable
(ISymbolTable symTable) Assigns an optional symbol table so that the symbol can get/set its value dynamically e.g., via ThreadLocalSymbolTable.void
setScriptPart
(IScriptPartId partId) Methods inherited from class gw.internal.gosu.parser.Symbol
assignIndexInStack, canBeCaptured, createReducedSymbol, equals, getAnnotations, getDefaultValueExpression, getDisplayName, getDynamicSymbolTable, getFullDescription, getIndex, getModifierInfo, getModifiers, getName, getSignatureDescription, getSymbolClass, getType, getValue, getValueDirectly, invoke, isAbstract, isClassMember, isFinal, isHide, isImplicitlyInitialized, isInternal, isOverride, isPrivate, isProtected, isPublic, isReified, isStackSymbol, isStatic, isValueBoxed, isWritable, makeCapturedSymbol, renameAsErrantDuplicate, replaceModifierInfo, setAbstract, setClassMember, setDefaultValueExpression, setFinal, setHide, setIndex, setInternal, setModifierInfo, setModifiers, setName, setOverride, setPrivate, setProtected, setPublic, setReified, setStatic, setType, setValue, setValueDirectly, setValueIsBoxed, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface gw.lang.parser.IFunctionSymbol
getModifiers, getSignatureDescription, invoke, isStackSymbol
Methods inherited from interface gw.lang.parser.IReducedSymbol
getAnnotations, getFullDescription, getSymbolClass, getType, isAbstract, isFinal, isInternal, isPrivate, isProtected, isPublic, isReified, isStatic
Methods inherited from interface gw.lang.parser.ISymbol
canBeCaptured, createReducedSymbol, getDefaultValueExpression, getDisplayName, getDynamicSymbolTable, getIndex, getModifierInfo, getName, getType, getValue, isValueBoxed, isWritable, makeCapturedSymbol, setDefaultValueExpression, setType, setValue, setValueIsBoxed
-
Field Details
-
_symTable
-
_scriptPartId
-
-
Constructor Details
-
AbstractDynamicSymbol
Constructs AbstractDynamicSymbol for use with an IGosuParser's ISymbolTable.- Parameters:
symTable
- The symbol table.strName
- The symbol name.type
- The IGosuParser specific type.
-
AbstractDynamicSymbol
-
-
Method Details
-
assignIndex
- Overrides:
assignIndex
in classSymbol
-
setDynamicSymbolTable
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
- Overrides:
setDynamicSymbolTable
in classSymbol
-
hasDynamicSymbolTable
public boolean hasDynamicSymbolTable()- Specified by:
hasDynamicSymbolTable
in interfaceISymbol
- Overrides:
hasDynamicSymbolTable
in classSymbol
-
getScriptPart
- Specified by:
getScriptPart
in interfaceIDynamicSymbol
- Specified by:
getScriptPart
in interfaceIReducedSymbol
- Overrides:
getScriptPart
in classSymbol
- Returns:
- This is used for storing runtime implementation specific data. Typically, this field will contain a reference to the class (or executable unit) containing this function.
-
setScriptPart
-
getGosuClass
- Specified by:
getGosuClass
in interfaceIDynamicSymbol
- Specified by:
getGosuClass
in interfaceIReducedSymbol
- Overrides:
getGosuClass
in classSymbol
-
clearDebugInfo
public void clearDebugInfo() -
getCompiledStatementDirectly
Statement getCompiledStatementDirectly() -
getSymbolTable
-
isFromJava
public boolean isFromJava()- Specified by:
isFromJava
in interfaceIFunctionSymbol
- Overrides:
isFromJava
in classSymbol
- Returns:
- true if this function symbol came from a java superclass
-
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
- Overrides:
getLightWeightReference
in classSymbol
-
getParameterizedVersion
-
isLocal
public boolean isLocal() -
hasTypeVariables
public boolean hasTypeVariables()- Specified by:
hasTypeVariables
in interfaceIReducedSymbol
- Overrides:
hasTypeVariables
in classSymbol
-