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 intassignIndex(IScope scope) void(package private) Statementabstract ISymbolCreates a copy of this symbol without the value so that the empty symbol can be stored.abstract AbstractDynamicSymbolgetParameterizedVersion(IGosuClass gsClass) booleanbooleanbooleanbooleanisLocal()voidsetDynamicSymbolTable(ISymbolTable symTable) Assigns an optional symbol table so that the symbol can get/set its value dynamically e.g., via ThreadLocalSymbolTable.voidsetScriptPart(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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gw.lang.parser.IFunctionSymbol
getModifiers, getSignatureDescription, invoke, isStackSymbolMethods inherited from interface gw.lang.parser.IReducedSymbol
getAnnotations, getFullDescription, getSymbolClass, getType, isAbstract, isFinal, isInternal, isPrivate, isProtected, isPublic, isReified, isStaticMethods 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:
assignIndexin classSymbol
-
setDynamicSymbolTable
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- Overrides:
setDynamicSymbolTablein classSymbol
-
hasDynamicSymbolTable
public boolean hasDynamicSymbolTable()- Specified by:
hasDynamicSymbolTablein interfaceISymbol- Overrides:
hasDynamicSymbolTablein classSymbol
-
getScriptPart
- Specified by:
getScriptPartin interfaceIDynamicSymbol- Specified by:
getScriptPartin interfaceIReducedSymbol- Overrides:
getScriptPartin 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:
getGosuClassin interfaceIDynamicSymbol- Specified by:
getGosuClassin interfaceIReducedSymbol- Overrides:
getGosuClassin classSymbol
-
clearDebugInfo
public void clearDebugInfo() -
getCompiledStatementDirectly
Statement getCompiledStatementDirectly() -
getSymbolTable
-
isFromJava
public boolean isFromJava()- Specified by:
isFromJavain interfaceIFunctionSymbol- Overrides:
isFromJavain classSymbol- Returns:
- true if this function symbol came from a java superclass
-
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- Overrides:
getLightWeightReferencein classSymbol
-
getParameterizedVersion
-
isLocal
public boolean isLocal() -
hasTypeVariables
public boolean hasTypeVariables()- Specified by:
hasTypeVariablesin interfaceIReducedSymbol- Overrides:
hasTypeVariablesin classSymbol
-