Class VariableSymbolDB

  • All Implemented Interfaces:
    Symbol
    Direct Known Subclasses:
    GlobalVariableSymbolDB

    public class VariableSymbolDB
    extends SymbolDB
    Symbol class for function variables. Symbol Data Usage: String stringData - variable comment
    • Constructor Detail

    • Method Detail

      • setInvalid

        public void setInvalid()
        Description copied from class: DatabaseObject
        Invalidate this object. This does not necessarily mean that this object can never be used again. If the object can refresh itself, it may still be useable.
        Overrides:
        setInvalid in class DatabaseObject
      • refresh

        protected boolean refresh​(DBRecord rec)
        Description copied from class: DatabaseObject
        Tells the object to refresh its state from the database using the specified record if not null. NOTE: The default implementation ignores the record and invokes refresh(). Implementations of this method must take care if multiple database tables are used since the record supplied could correspond to another object. In some cases it may be best not to override this method or ignore the record provided.
        Overrides:
        refresh in class SymbolDB
        Parameters:
        rec - valid record associated with object's key (optional, may be null to force record lookup or other refresh technique)
        Returns:
        true if the object was able to refresh itself. Return false if record is null and object was deleted. Objects that extend this class must implement a refresh method. If an object can never refresh itself, then it should always return false.
      • delete

        public boolean delete()
        Description copied from interface: Symbol
        Delete the symbol and its associated resources. Any references symbol associations will be discarded.
        Specified by:
        delete in interface Symbol
        Overrides:
        delete in class SymbolDB
        Returns:
        true if successful
        See Also:
        Symbol.delete()
      • getObject

        public java.lang.Object getObject()
        Returns:
        object associated with this symbol or null if symbol has been deleted
        See Also:
        Symbol.getObject()
      • isExternal

        public boolean isExternal()
        Description copied from interface: Symbol
        Returns true if this an external symbol.
        Returns:
        true if this an external symbol.
        See Also:
        Address.isExternalAddress()
      • doGetName

        protected java.lang.String doGetName()
        Description copied from class: SymbolDB
        The code for creating the name content for this symbol. This code will be called with the symbol's lock.
        Overrides:
        doGetName in class SymbolDB
        Returns:
        the name
      • validateNameSource

        protected SourceType validateNameSource​(java.lang.String newName,
                                                SourceType source)
        Description copied from class: SymbolDB
        Allow symbol implementations to validate the source when setting the name of this symbol
        Overrides:
        validateNameSource in class SymbolDB
        Parameters:
        newName - the new name
        source - the source type
        Returns:
        the validated source type
      • getDataType

        public DataType getDataType()
      • setStorageAndDataType

        public void setStorageAndDataType​(VariableStorage newStorage,
                                          DataType dt)
        Change the storage address and data-type associated with this variable symbol.
        Parameters:
        newStorage -
        dt - data-type
      • getFirstUseOffset

        public int getFirstUseOffset()
      • setFirstUseOffset

        public void setFirstUseOffset​(int firstUseOffset)
      • getOrdinal

        public int getOrdinal()
      • setOrdinal

        public void setOrdinal​(int ordinal)
      • getReferences

        public Reference[] getReferences​(TaskMonitor monitor)
        Description copied from interface: Symbol
        Returns all memory references to the address of this symbol. If you do not have a TaskMonitor instance, then you can pass TaskMonitorAdapter.DUMMY_MONITOR or null.
        Specified by:
        getReferences in interface Symbol
        Overrides:
        getReferences in class SymbolDB
        Parameters:
        monitor - the monitor that is used to report progress and to cancel this potentially long-running call
        Returns:
        all memory references to the address of this symbol.
      • hasReferences

        public boolean hasReferences()
        Specified by:
        hasReferences in interface Symbol
        Overrides:
        hasReferences in class SymbolDB
        Returns:
        true if this symbol has at least one reference to it.