Class SegmentInformation

java.lang.Object
com.pnfsoftware.jeb.core.units.codeobject.SegmentInformation
All Implemented Interfaces:
ISegmentInformation

@Ser public class SegmentInformation extends Object implements ISegmentInformation
Standard implementation of the ISegmentInformation interface for segments and sections.
  • Constructor Details

    • SegmentInformation

      public SegmentInformation(String name, long offsetInFile, long sizeInFile, long offsetInMemory, long sizeInMemory, int flags)
    • SegmentInformation

      public SegmentInformation(SegmentInformation segment)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: ISegmentInformation
      Retrieve the name of the segment or section.
      Specified by:
      getName in interface ISegmentInformation
      Returns:
      the name, null if unsupported
    • setName

      public void setName(String name)
    • getOffsetInFile

      public long getOffsetInFile()
      Description copied from interface: ISegmentInformation
      Get the file offset of the segment or section.
      Specified by:
      getOffsetInFile in interface ISegmentInformation
      Returns:
      the file offset in bytes
    • setOffsetInFile

      public void setOffsetInFile(long offsetInFile)
    • getSizeInFile

      public long getSizeInFile()
      Description copied from interface: ISegmentInformation
      Get the file size of this segment or section.
      Specified by:
      getSizeInFile in interface ISegmentInformation
      Returns:
      the size in bytes
    • setSizeInFile

      public void setSizeInFile(long sizeInFile)
    • getOffsetInMemory

      public long getOffsetInMemory()
      Description copied from interface: ISegmentInformation
      Get the in-memory, base-relative address of the beginning of this segment or section. If a base address is not known or cannot be determined, the offset is 0-relative, and therefore, considered absolute.
      Specified by:
      getOffsetInMemory in interface ISegmentInformation
      Returns:
      the base-relative memory address in bytes
    • setOffsetInMemory

      public void setOffsetInMemory(long offsetInMemory)
    • getSizeInMemory

      public long getSizeInMemory()
      Description copied from interface: ISegmentInformation
      Get the in-memory size of this segment or section.
      Specified by:
      getSizeInMemory in interface ISegmentInformation
      Returns:
      the size in bytes
    • setSizeInMemory

      public void setSizeInMemory(long sizeInMemory)
    • getFlags

      public int getFlags()
      Description copied from interface: ISegmentInformation
      Get the flags for this segment or section.
      Specified by:
      getFlags in interface ISegmentInformation
      Returns:
      a combination of FLAG_* attributes
    • setFlags

      public void setFlags(int flags)
    • getAlignment

      public long getAlignment()
      Description copied from interface: ISegmentInformation
      Get the memory alignment within the segment.
      Specified by:
      getAlignment in interface ISegmentInformation
      Returns:
      the alignment in bytes
    • setAlignment

      public void setAlignment(long alignment)
    • toString

      public String toString()
      Overrides:
      toString in class Object