Class TypeLibraryMetadata

java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.type.TypeLibraryMetadata

@Ser public class TypeLibraryMetadata extends Object
Metadata header for type library binary files. Refer to ITypeLibrary for details about methods.
  • Method Details

    • create

      public static TypeLibraryMetadata create(ProcessorType processorType, SubsystemType subsystemType, CompilerType compilerType)
      Create type library metadata for a single processor/subsystem/compiler target.
      Parameters:
      processorType - processor type
      subsystemType - subsystem type
      compilerType - compiler type
      Returns:
      metadata object
    • create

      public static TypeLibraryMetadata create(ProcessorType processorType, SubsystemType subsystemType, CompilerType compilerType, int standardPackingAlignment, int groupId, double priorityOrder, int uuid, int version, String name, String description, String author)
      Create type library metadata for a single processor/subsystem/compiler target.
      Parameters:
      processorType - processor type
      subsystemType - subsystem type
      compilerType - compiler type
      standardPackingAlignment - standard packing alignment
      groupId - type library group id
      priorityOrder - priority order within the group
      uuid - metadata UUID
      version - metadata version
      name - type library name
      description - type library description
      author - type library author
      Returns:
      metadata object
    • create

      public static TypeLibraryMetadata create(List<ProcessorType> processorTypes, List<SubsystemType> subsystemTypes, CompilerType compilerType, int standardPackingAlignment, int groupId, double priorityOrder, int uuid, int version, String name, String description, String author)
      Create type library metadata.
      Parameters:
      processorTypes - target processor types
      subsystemTypes - target subsystem types
      compilerType - target compiler type
      standardPackingAlignment - standard packing alignment
      groupId - type library group id
      priorityOrder - priority order within the group
      uuid - metadata UUID
      version - metadata version
      name - type library name
      description - type library description
      author - type library author
      Returns:
      metadata object
    • getPrimaryProcessorType

      public ProcessorType getPrimaryProcessorType()
      Retrieve the primary target processor type.
      Returns:
      primary processor type, or null
    • getProcessorTypes

      public List<ProcessorType> getProcessorTypes()
      Retrieve all target processor types.
      Returns:
      processor types
    • getPrimarySubsystemType

      public SubsystemType getPrimarySubsystemType()
      Retrieve the primary target subsystem type.
      Returns:
      primary subsystem type, or null
    • getSubsystemTypes

      public List<SubsystemType> getSubsystemTypes()
      Retrieve all target subsystem types.
      Returns:
      subsystem types
    • getCompilerType

      public CompilerType getCompilerType()
      Retrieve the target compiler type.
      Returns:
      compiler type, or null
    • getGroupId

      public int getGroupId()
      Retrieve the type library group id.
      Returns:
      group id
    • getPriorityOrder

      public double getPriorityOrder()
      Retrieve the priority order within the group.
      Returns:
      priority order
    • getUuid

      public int getUuid()
      Retrieve the metadata UUID.
      Returns:
      UUID
    • getVersion

      public int getVersion()
      Retrieve the metadata version.
      Returns:
      version
    • getName

      public String getName()
      Retrieve the type library name.
      Returns:
      name
    • getDescription

      public String getDescription()
      Retrieve the type library description.
      Returns:
      description
    • getAuthor

      public String getAuthor()
      Retrieve the type library author.
      Returns:
      author
    • getCreationTimestamp

      public long getCreationTimestamp()
      Retrieve the creation timestamp.
      Returns:
      creation timestamp in seconds since the Unix epoch
    • putData

      public void putData(Map<? extends String,? extends Object> map)
      Add custom metadata entries.
      Parameters:
      map - metadata entries
    • putData

      public void putData(String key, Object value)
      Add a custom metadata entry.
      Parameters:
      key - metadata key
      value - metadata value
    • getData

      public Object getData(String key)
      Retrieve a custom metadata entry.
      Parameters:
      key - metadata key
      Returns:
      metadata value, or null
    • getStandardPackingAlignment

      public int getStandardPackingAlignment()
      Retrieve the standard packing value used by the compiler to align structure fields if nothing was explicitly specified. For type readers, this value is informative and may not be present (in which case, the method returns 0). For type generators, this value is important as it is used to generate proper structure layouts.
      Returns:
      0 means unknown or not set; negative values are illegal; the value Integer.MAX_VALUE means that struct members are aligned on the underlying primitive size
    • toString

      public String toString()
      Overrides:
      toString in class Object