Class Symbol

    • Field Detail

      • MEMBER_STACK_PROVIDER

        public static final IStackProvider MEMBER_STACK_PROVIDER
      • _name

        private java.lang.String _name
      • _type

        private IType _type
      • _value

        protected java.lang.Object _value
      • _iIndex

        protected int _iIndex
      • _bGlobal

        protected boolean _bGlobal
    • Constructor Detail

      • Symbol

        public Symbol​(java.lang.String strName,
                      IType type,
                      IStackProvider stackProvider)
      • Symbol

        public Symbol​(java.lang.String strName,
                      IType type,
                      IStackProvider stackProvider,
                      java.lang.Object value)
      • Symbol

        public Symbol​(java.lang.String strName,
                      IType type,
                      IStackProvider stackProvider,
                      java.lang.Object value,
                      IScope scope)
      • Symbol

        public Symbol​(Symbol copy)
      • Symbol

        public Symbol​(java.lang.String strName,
                      IType type,
                      java.lang.Object value)
    • Method Detail

      • 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 interface ISymbol
      • assignIndex

        protected int assignIndex​(IScope scope)
      • assignIndexInStack

        protected int assignIndexInStack​(IScope scope)
      • getDisplayName

        public java.lang.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 interface IReducedSymbol
        Specified by:
        getDisplayName in interface ISymbol
      • renameAsErrantDuplicate

        public void renameAsErrantDuplicate​(int iIndex)
      • setType

        public void setType​(IType type)
        Sets the Symbol's type.
        Specified by:
        setType in interface ISymbol
      • getValue

        public java.lang.Object getValue()
        Returns the value assigned to this Symbol.
        Specified by:
        getValue in interface ISymbol
      • getValueFromSymbolTable

        private java.lang.Object getValueFromSymbolTable()
      • setValue

        public void setValue​(java.lang.Object value)
        Assigns a value to this Symbol.
        Specified by:
        setValue in interface ISymbol
      • isStackSymbol

        public boolean isStackSymbol()
        Description copied from interface: IFunctionSymbol
        Returns true if the value of this function symbol is stored on the stack as a variable
        Specified by:
        isStackSymbol in interface IFunctionSymbol
      • setValueFromSymbolTable

        private void setValueFromSymbolTable​(java.lang.Object value)
      • getValueDirectly

        public java.lang.Object getValueDirectly()
      • setValueDirectly

        public void setValueDirectly​(java.lang.Object value)
      • invoke

        public java.lang.Object invoke​(java.lang.Object[] args)
        Invokes function.
        Specified by:
        invoke in interface IFunctionSymbol
        Parameters:
        args - An array of arguments to forward to the function.
      • 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 interface ISymbol
      • isImplicitlyInitialized

        public boolean isImplicitlyInitialized()
      • 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 interface ISymbol
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • getSignatureDescription

        public java.lang.String getSignatureDescription()
        Description copied from interface: IFunctionSymbol
        Returns a description of arguments of the form ( < argName1 >, < argName2 >, etc. ) appropriate for display in a source editor ui.
        Specified by:
        getSignatureDescription in interface IFunctionSymbol
      • isClassMember

        public boolean isClassMember()
      • setClassMember

        public void setClassMember​(boolean bClassMember)
      • setStatic

        public void setStatic​(boolean bStatic)
      • setPrivate

        public void setPrivate​(boolean bPrivate)
      • setInternal

        public void setInternal​(boolean bInternal)
      • setProtected

        public void setProtected​(boolean bProtected)
      • setPublic

        public void setPublic​(boolean bPublic)
      • setAbstract

        public void setAbstract​(boolean bAbstract)
      • setFinal

        public void setFinal​(boolean bFinal)
      • setReified

        public void setReified​(boolean bReified)
      • isOverride

        public boolean isOverride()
      • setOverride

        public void setOverride​(boolean bOverride)
      • isHide

        public boolean isHide()
      • setHide

        public void setHide​(boolean bHide)
      • setModifierInfo

        public void setModifierInfo​(IModifierInfo modifiers)
      • replaceModifierInfo

        public void replaceModifierInfo​(IModifierInfo mi)
      • setModifiers

        public void setModifiers​(int modifiers)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setIndex

        public void setIndex​(int i)
      • 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 interface ISymbol
      • setName

        protected void setName​(java.lang.String name)
      • isLocal

        public boolean isLocal()
        Specified by:
        isLocal in interface ISymbol
      • isFromJava

        public boolean isFromJava()
        Specified by:
        isFromJava in interface IFunctionSymbol
        Returns:
        true if this function symbol came from a java superclass