Class TypeLibraryMetadata
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.type.TypeLibraryMetadata
Metadata header for type library binary files. Refer to
ITypeLibrary for details about
methods.-
Method Summary
Modifier and TypeMethodDescriptionstatic TypeLibraryMetadatacreate(ProcessorType processorType, SubsystemType subsystemType, CompilerType compilerType) Create type library metadata for a single processor/subsystem/compiler target.static TypeLibraryMetadatacreate(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.static TypeLibraryMetadatacreate(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.Retrieve the type library author.Retrieve the target compiler type.longRetrieve the creation timestamp.Retrieve a custom metadata entry.Retrieve the type library description.intRetrieve the type library group id.getName()Retrieve the type library name.Retrieve the primary target processor type.Retrieve the primary target subsystem type.doubleRetrieve the priority order within the group.Retrieve all target processor types.intRetrieve the standard packing value used by the compiler to align structure fields if nothing was explicitly specified.Retrieve all target subsystem types.intgetUuid()Retrieve the metadata UUID.intRetrieve the metadata version.voidAdd a custom metadata entry.voidAdd custom metadata entries.toString()
-
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 typesubsystemType- subsystem typecompilerType- 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 typesubsystemType- subsystem typecompilerType- compiler typestandardPackingAlignment- standard packing alignmentgroupId- type library group idpriorityOrder- priority order within the groupuuid- metadata UUIDversion- metadata versionname- type library namedescription- type library descriptionauthor- 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 typessubsystemTypes- target subsystem typescompilerType- target compiler typestandardPackingAlignment- standard packing alignmentgroupId- type library group idpriorityOrder- priority order within the groupuuid- metadata UUIDversion- metadata versionname- type library namedescription- type library descriptionauthor- type library author- Returns:
- metadata object
-
getPrimaryProcessorType
Retrieve the primary target processor type.- Returns:
- primary processor type, or null
-
getProcessorTypes
Retrieve all target processor types.- Returns:
- processor types
-
getPrimarySubsystemType
Retrieve the primary target subsystem type.- Returns:
- primary subsystem type, or null
-
getSubsystemTypes
Retrieve all target subsystem types.- Returns:
- subsystem types
-
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
Retrieve the type library name.- Returns:
- name
-
getDescription
Retrieve the type library description.- Returns:
- description
-
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
Add custom metadata entries.- Parameters:
map- metadata entries
-
putData
Add a custom metadata entry.- Parameters:
key- metadata keyvalue- metadata value
-
getData
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_VALUEmeans that struct members are aligned on the underlying primitive size
-
toString
-