Class SymbolInformation

java.lang.Object
com.pnfsoftware.jeb.core.units.codeobject.SymbolInformation
All Implemented Interfaces:
ISymbolInformation

@Ser public class SymbolInformation extends Object implements ISymbolInformation
Standard implementation of ISymbolInformation.
  • Constructor Details

    • SymbolInformation

      public SymbolInformation(SymbolType type, int flags, long identifier, String name, long address, long symbolAddress, long symbolSize)
      Create symbol information.
      Parameters:
      type - symbol type
      flags - symbol flags
      identifier - symbol identifier
      name - symbol name
      address - descriptor relative address
      symbolAddress - symbol relative address
      symbolSize - symbol size
  • Method Details

    • getType

      public SymbolType getType()
      Description copied from interface: ISymbolInformation
      Get the symbol type.
      Specified by:
      getType in interface ISymbolInformation
      Returns:
      the type
    • setType

      public void setType(SymbolType type)
      Set the symbol type.
      Parameters:
      type - symbol type
    • getFlags

      public int getFlags()
      Description copied from interface: ISymbolInformation
      Get the symbol flags. A valid combination of FLAG_xxx.
      Specified by:
      getFlags in interface ISymbolInformation
      Returns:
      the flags
    • setFlags

      public void setFlags(int flags)
      Set symbol flags.
      Parameters:
      flags - symbol flags
    • getIdentifier

      public long getIdentifier()
      Description copied from interface: ISymbolInformation
      Get the symbol identifier. Optional.
      Specified by:
      getIdentifier in interface ISymbolInformation
      Returns:
      the symbol identifier
    • setIdentifier

      public void setIdentifier(long identifier)
      Set the symbol identifier.
      Parameters:
      identifier - symbol identifier
    • getName

      public String getName()
      Description copied from interface: ISymbolInformation
      Get the symbol name.

      Special syntax for imported functions: the function name may be prefixed by the library name that contains it. A bang character is used as a separator. Example: kernel32.dll!Sleep
      Note: the method name may be mangled; it may be fully qualified. The library name is optional; its extension is optional (eg, .dll, .so); it may be a full path.

      Specified by:
      getName in interface ISymbolInformation
      Returns:
      the symbol name
    • setName

      public void setName(String name)
      Set the symbol name.
      Parameters:
      name - symbol name
    • getRelativeAddress

      public long getRelativeAddress()
      Description copied from interface: ISymbolInformation
      Get the base-relative address of the description of the symbol. Informative and optional.
      Specified by:
      getRelativeAddress in interface ISymbolInformation
      Returns:
      the base-relative address of the symbol description
    • setRelativeAddress

      public void setRelativeAddress(long address)
      Set the descriptor relative address.
      Parameters:
      address - descriptor relative address
    • getSymbolRelativeAddress

      public long getSymbolRelativeAddress()
      Description copied from interface: ISymbolInformation
      Get the base-relative address of the symbol.
      Specified by:
      getSymbolRelativeAddress in interface ISymbolInformation
      Returns:
      the symbol RVA
    • setSymbolRelativeAddress

      public void setSymbolRelativeAddress(long address)
      Set the symbol relative address.
      Parameters:
      address - symbol relative address
    • getSymbolSize

      public long getSymbolSize()
      Description copied from interface: ISymbolInformation
      Get the size of the symbol. May not be known.
      Specified by:
      getSymbolSize in interface ISymbolInformation
      Returns:
      the symbol size
    • setSymbolSize

      public void setSymbolSize(long size)
      Set the symbol size.
      Parameters:
      size - symbol size
    • getSymbolDataTypeInformation

      public String getSymbolDataTypeInformation()
      Description copied from interface: ISymbolInformation
      Retrieve optional symbol data type information.
      Specified by:
      getSymbolDataTypeInformation in interface ISymbolInformation
      Returns:
      data type information, or null if none
    • setSymbolDataTypeInformation

      public void setSymbolDataTypeInformation(String information)
      Set data type information.
      Parameters:
      information - data type information
    • getProcessorMode

      public int getProcessorMode()
      Description copied from interface: ISymbolInformation
      Retrieve the optional processor mode associated to this symbol, if the address points to code. This value is optional, implementations may return 0.
      Specified by:
      getProcessorMode in interface ISymbolInformation
      Returns:
      the optional processor mode (refer to IProcessor for standard values)
    • setProcessorMode

      public void setProcessorMode(int procMode)
      Set the processor mode.
      Parameters:
      procMode - processor mode
    • isInternal

      public boolean isInternal()
      Checks if the symbol is neither exported nor imported.
      Returns:
      true if this symbol is internal
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object