Class VariableSymbolDB

  • All Implemented Interfaces:
    Symbol
    Direct Known Subclasses:
    GlobalVariableSymbolDB

    public class VariableSymbolDB
    extends SymbolDB
    Symbol class for function variables. Symbol Data Usage: long data1 - data type ID int data2 - first-use-offset / ordinal String data3 - variable comment
    • Constructor Detail

      • VariableSymbolDB

        public VariableSymbolDB​(SymbolManager symbolMgr,
                                DBObjectCache<SymbolDB> cache,
                                SymbolType type,
                                VariableStorageManagerDB variableMgr,
                                Address address,
                                Record record)
        Constructs a new VariableSymbol
        Parameters:
        symbolMgr - the symbol manager
        cache - symbol object cache
        type - the symbol type.
        address - the address of the symbol (stack address)
        record - the record for the symbol
    • 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​(Record 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.
      • 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()
      • 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
      • 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)