Class Omf2or4

java.lang.Object
ghidra.app.util.bin.format.omf.Omf2or4
All Implemented Interfaces:
StructConverter

public class Omf2or4 extends Object implements StructConverter
An OMF value that is either 2 or 4 bytes
  • Constructor Details

    • Omf2or4

      public Omf2or4(int length, long value)
      Creates a new Omf2or4
      Parameters:
      length - 2 or 4
      value - The 2 or 4 byte value
  • Method Details

    • length

      public int length()
      Returns the length of the value (2 or 4).
      Returns:
      the length of the value (2 or 4)
    • value

      public long value()
      Returns the value.
      Returns:
      the value
    • toDataType

      public DataType toDataType() throws DuplicateNameException, IOException
      Description copied from interface: StructConverter
      Returns a structure datatype representing the contents of the implementor of this interface.

      For example, given:

       class A {
           int foo;
           double bar;
       }
       

      The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.

      Specified by:
      toDataType in interface StructConverter
      Returns:
      returns a structure datatype representing the implementor of this interface
      Throws:
      DuplicateNameException - when a datatype of the same name already exists
      IOException - if an IO-related error occurs
      See Also: