Class ShiftedAddressDataType

  • All Implemented Interfaces:
    BuiltInDataType, DataType, ExtensionPoint, java.util.EventListener, javax.swing.event.ChangeListener

    public class ShiftedAddressDataType
    extends BuiltIn
    Provides a definition of a Double Word within a program.
    • Constructor Detail

      • ShiftedAddressDataType

        public ShiftedAddressDataType()
        Creates a Double Word data type.
      • ShiftedAddressDataType

        public ShiftedAddressDataType​(DataTypeManager dtm)
    • Method Detail

      • getLength

        public int getLength()
        Description copied from interface: DataType
        Get the length (number of 8-bit bytes) of this DataType.
        the length of this DataType
        See Also:
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: DataType
        Get a String briefly describing this DataType.
        a one-liner describing this DataType.
        See Also:
      • getValue

        public java.lang.Object getValue​(MemBuffer buf,
                                         Settings settings,
                                         int length)
        Description copied from interface: DataType
        Get the data in the form of the appropriate Object for this DataType. For instance if the data type is an AddressDT, return an Address object. a Byte, return a Scalar* (maybe this should be a Byte) a Float, return a Float
        buf - the data buffer.
        settings - the settings to use.
        length - the number of bytes to get the value from.
        the data Object.
        See Also:, ghidra.program.model.lang.ProcessorContext, ghidra.docking.settings.Settings, int)
      • getValueClass

        public java.lang.Class<?> getValueClass​(Settings settings)
        Description copied from interface: DataType
        Get the Class of the value to be returned by this data type.
        Specified by:
        getValueClass in interface DataType
        getValueClass in class DataTypeImpl
        settings - the relevant settings to use or null for default.
        Class of the value to be returned by this data type or null if it can vary or is unspecified. Types which correspond to a string or char array will return the String class.
      • getAddressValue

        public static Address getAddressValue​(MemBuffer buf,
                                              int size,
                                              int shift,
                                              AddressSpace targetSpace)
        Generate an address value based upon bytes stored at the specified buf location
        buf - memory buffer and stored pointer location
        size - pointer size in bytes
        shift - left shift amount
        targetSpace - address space for returned pointer
        pointer value or null if unusable buf or data
      • getString

        protected java.lang.String getString​(MemBuffer buf,
                                             Settings settings)
      • getRepresentation

        public java.lang.String getRepresentation​(MemBuffer buf,
                                                  Settings settings,
                                                  int length)
        Description copied from interface: DataType
        Get bytes from memory in a printable format for this type.
        buf - the data.
        settings - the settings to use for the representation.
        length - the number of bytes to represent.
        the representation of the data in this format, never null.
        See Also:, ProcessorContext, Settings, int)
      • clone

        public DataType clone​(DataTypeManager dtm)
        Description copied from interface: DataType
        Returns a new instance of this DataType with its universalID and SourceArchive identity retained. Note: for built-in DataType's, clone and copy should have the same affect.
        dtm - the data-type manager instance whose data-organization should apply.