Module openj9.dtfj
Package com.ibm.j9ddr

Class StructureReader


  • public class StructureReader
    extends Object
    • Field Detail

      • J9_STRUCTURES_EYECATCHER

        public static final int J9_STRUCTURES_EYECATCHER
        See Also:
        Constant Field Values
      • STRUCTURE_CONSTRUCTOR_SIGNATURE

        public static final Class<?>[] STRUCTURE_CONSTRUCTOR_SIGNATURE
      • BIT_FIELD_FORMAT_LITTLE_ENDIAN

        public static final byte BIT_FIELD_FORMAT_LITTLE_ENDIAN
        See Also:
        Constant Field Values
      • BIT_FIELD_FORMAT_BIG_ENDIAN

        public static final byte BIT_FIELD_FORMAT_BIG_ENDIAN
        See Also:
        Constant Field Values
    • Constructor Detail

      • StructureReader

        public StructureReader​(ImageInputStream in)
                        throws IOException
        Initialize this reader from the supplied data. The ImageInputStream must be validated and already be positioned to point to the first byte of the DDR Structure Data. The ByteOrder of the ImageInputStream will be adjusted to match the file being read. (The DDR Structure data is written in the ByteOrder of the platform that created the core file.)
        Throws:
        IOException
    • Method Detail

      • getBasePackage

        public String getBasePackage()
      • getPackageVersion

        public long getPackageVersion()
        Get the package version number, derived from fields of DDRAlgorithmVersions in the blob.
        Returns:
        the package version number
      • getPackageName

        public String getPackageName​(StructureReader.PackageNameType type)
        Get the package name that should be used including the version information
        Parameters:
        type -
        Returns:
      • getStructureNames

        public Set<String> getStructureNames()
        Get a list of the structures defined by this reader
        Returns:
        Set interface for the structure names
      • hasStructure

        public boolean hasStructure​(String name)
        Test to see if a structure has been read in and hence available
        Parameters:
        name - name of the structure to look for
        Returns:
        true if the structure exists, false if not
      • getStructureSizeOf

        public int getStructureSizeOf​(String structureName)
      • getFields

        public List<StructureReader.FieldDescriptor> getFields​(String structureName)
        Get a map of the fields for a particular structure and their offsets.
        Parameters:
        structureName - name of the structure
        Returns:
        map of the fields as FieldName, Offset pair
      • addStructures

        public void addStructures​(ImageInputStream ddrStream)
                           throws IOException
        Add to the existing set of structures already contained in this reader. Note that this will replace any definitions already contained within the reader.
        Parameters:
        ddrStream - stream to add the structures from
        Throws:
        IOException
      • getConstantValue

        public long getConstantValue​(String structureName,
                                     String constantName,
                                     long defaultValue)
      • getBuildFlagValue

        public boolean getBuildFlagValue​(String structureName,
                                         String constantName,
                                         boolean defaultValue)
      • getSizeOfBool

        public byte getSizeOfBool()
      • getSizeOfUDATA

        public byte getSizeOfUDATA()
      • getBitFieldFormat

        public byte getBitFieldFormat()
      • simplifyType

        public static String simplifyType​(String type)