Enum MemoryDataType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MemoryDataType>

    public enum MemoryDataType
    extends java.lang.Enum<MemoryDataType>
    This enumeration contains basic data types.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BYTE
      The byte data type.
      DWORD
      The double-word data type.
      HWORD
      The half-word data type.
      OWORD
      The octo-word data type.
      QWORD
      The quad-word data type.
      WORD
      The word data type.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.math.BigInteger align​(java.math.BigInteger address)
      Returns the aligned address (zero a required number of bits at the end).
      int getLowerAddressBit()
      Returns the lower significant bit of the address.
      int getSizeInBytes()
      Returns the size in bytes.
      boolean isAligned​(java.math.BigInteger address)
      Checks whether the address is aligned (contains a sufficient number of zero bits at the end).
      static MemoryDataType type​(int sizeInBytes)  
      static MemoryDataType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MemoryDataType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static MemoryDataType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MemoryDataType c : MemoryDataType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MemoryDataType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getSizeInBytes

        public int getSizeInBytes()
        Returns the size in bytes.
        Returns:
        the size.
      • getLowerAddressBit

        public int getLowerAddressBit()
        Returns the lower significant bit of the address.
        Returns:
        the lower significant bit.
      • isAligned

        public boolean isAligned​(java.math.BigInteger address)
        Checks whether the address is aligned (contains a sufficient number of zero bits at the end).
        Parameters:
        address - the address to be checked.
        Returns:
        true if the address is aligned; false otherwise.
      • align

        public java.math.BigInteger align​(java.math.BigInteger address)
        Returns the aligned address (zero a required number of bits at the end).
        Parameters:
        address - the address to be aligned.
        Returns:
        the aligned address.