Module openj9.dtfj

Class TemplateField

java.lang.Object
com.ibm.j9ddr.corereaders.tdump.zebedee.util.TemplateField

public class TemplateField extends Object
This class represents one field of a template.
  • Method Details

    • isBitField

      public boolean isBitField()
      Returns true if this is a bit field (ie the number of bits is not a multiple of 8)
    • byteLength

      public int byteLength()
      Returns the length in bytes of this field
    • bitLength

      public int bitLength()
      Returns the length in bits of this field
    • getName

      public String getName()
      Returns the name of the field
    • readLong

      public long readLong(ImageInputStream inputStream, long address) throws IOException
      Returns the field in long form. The field must be either of type "int" or of type "pointer". For integers if the native size is less than 64 bits then a widening conversion is performed.
      Parameters:
      inputStream - the ImageInputStream to read from
      address - the address of the start of the template (not of the field!)
      Returns:
      the field converted to a long
      Throws:
      IOException - if any errors occurred on reading from the stream
    • isPointer

      public boolean isPointer()
      Returns true is this field is a pointer.
    • getOffset

      public int getOffset()
      Returns the offset (in bytes) of the field within the template.
      Returns:
      the offset of the field (rounded down for bit fields)
    • getBitOffset

      public int getBitOffset()
      Returns the offset (in bits) of the field within the template.
      Returns:
      the offset of the field