# Interface: com.pnfsoftware.jeb.core.units.code.asm.type.ITypeManager

A type manager, for primitive types as well as complex types.

## Method: addListener
- parameter: `listener`, type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeItemListener`

Description: Register a listener relaying events generated by this type manager's type items.
parameter: listener: listener to register

## Method: addStructureField
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureType`
- parameter: `fieldName`, type: `java.lang.String`
- parameter: `fieldTypeName`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`

Description: Convenience method. Append a field to a structure type item.
parameter: type: structure type
parameter: fieldName: field name
parameter: fieldTypeName: field type
return: created field, or null

## Method: addStructureField
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureType`
- parameter: `fieldName`, type: `java.lang.String`
- parameter: `fieldType`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`

Description: Append a field to a structure type item.
parameter: type: structure type
parameter: fieldName: field name
parameter: fieldType: field type
return: created field, or null

## Method: addStructureField
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureType`
- parameter: `fieldName`, type: `java.lang.String`
- parameter: `fieldType`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- parameter: `offset`, type: `int`
- parameter: `bitsize`, type: `int`
- parameter: `alignment`, type: `int`
- parameter: `flags`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`

Description: Add or append a field or bit field to a structure type item.
parameter: type: structure type
parameter: fieldName: field name
parameter: fieldType: field type
parameter: offset: \-1 to append, else, a structure offset
parameter: bitsize: optional, used to indicate a bitfield
parameter: alignment: optional, in bytes
parameter: flags: optional, a combination of `FLAG_xxx` constants
return: created field, or null

## Method: completeClassTypeInitialization
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IClassType`

Description: Complete initialization of a class type.
parameter: type: class type

## Method: createAlias
- parameter: `signature`, type: `java.lang.String`
- parameter: `aliasedType`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IAliasType`

Description: Create a new alias \(typedef\) type.
parameter: signature: alias signature
parameter: aliasedType: aliased type
return: created alias type

## Method: createAlias
- parameter: `signature`, type: `java.lang.String`
- parameter: `aliasedTypeSignature`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IAliasType`

Description: Convenience method to create a new alias type.
parameter: signature: alias signature
parameter: aliasedTypeSignature: aliased type signature
return: created alias type

## Method: createArray
- parameter: `baseTypeName`, type: `java.lang.String`
- parameter: `arraySize`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IArrayType`

Description: Create a new array type.
parameter: baseTypeName: element type signature
parameter: arraySize: number of elements
return: created array type

## Method: createArray
- parameter: `baseType`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- parameter: `arraySize`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IArrayType`

Description: Create a new array type.
parameter: baseType: type of array elements
parameter: arraySize: number of elements
return: created array type

## Method: createArray
- parameter: `baseType`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- parameter: `arraySize`, type: `int`
- parameter: `metadata`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IArrayType`

Description: Create a new array type.
parameter: baseType: type of array elements
parameter: arraySize: number of elements in this array \(must be \>= 0\)
parameter: metadata: Indicate that data contains meaningless elements. Internally, the            [IArrayType](IArrayType) will have the flag [ICodeItem#FLAG_TRANSIENT](ICodeItem#FLAG_TRANSIENT) and won't            be cached \(so it can be modified safely\).
return: created array type

## Method: createClassType
- parameter: `signature`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IClassType`

Description: Create a new class type.
parameter: signature: class type signature
return: created class type

## Method: createClassType
- parameter: `signature`, type: `java.lang.String`
- parameter: `padding`, type: `int`
- parameter: `alignment`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IClassType`

Description: Create a new class type.
parameter: signature: class type signature
parameter: padding: padding in bytes between fields
parameter: alignment: alignment in bytes
return: created class type

## Method: createEnumeration
- parameter: `signature`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IEnumerationType`

Description: Create a new enumeration type. Enumerated constants can be added after the type is created.
parameter: signature: enumeration signature
return: created enumeration type

## Method: createPrototype
- parameter: `returnType`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- parameter: `parameterTypes`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.type.INativeType>`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IPrototypeItem`

Description: Create a new prototype item with the default calling convention for this manager and no special prototype attribute.
parameter: returnType: optional; null means void return
parameter: parameterTypes: optional; null means no parameter
return: a new native prototype object

## Method: createPrototype
- parameter: `callingConvention`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention`
- parameter: `returnType`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- parameter: `parameterTypes`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.type.INativeType>`
- parameter: `attributes`, type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.asm.type.PrototypeAttribute>`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IPrototypeItem`

Description: Create a new prototype item.
parameter: callingConvention: optional; null means standard calling convention \(per this type            manager\)
parameter: returnType: optional; null means void return
parameter: parameterTypes: optional; null means no parameter
parameter: attributes: optional
return: a new native prototype object

## Method: createPrototypeEx
- parameter: `callingConvention`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention`
- parameter: `returnTypes`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.type.INativeType>`
- parameter: `parameterTypes`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.type.INativeType>`
- parameter: `attributes`, type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.asm.type.PrototypeAttribute>`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IPrototypeItem`

Description: Create a new prototype item. Multiple return value types may be specified.
parameter: callingConvention: optional calling convention
parameter: returnTypes: optional return types
parameter: parameterTypes: optional parameter types
parameter: attributes: optional prototype attributes
return: created native prototype object

## Method: createPrototypeEx
- parameter: `callingConvention`, type: `java.lang.String`
- parameter: `returnTypes`, type: `java.util.List<java.lang.String>`
- parameter: `parameterTypes`, type: `java.util.List<java.lang.String>`
- parameter: `attributes`, type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.asm.type.PrototypeAttribute>`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IPrototypeItem`

Description: Create a new prototype item.
parameter: callingConvention: optional calling convention name
parameter: returnTypes: optional return type signatures
parameter: parameterTypes: optional parameter type signatures
parameter: attributes: optional prototype attributes
return: created native prototype object

## Method: createReference
- parameter: `baseType`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- parameter: `refCount`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IReferenceType`

Description: Create a new reference \(pointer\) type.
parameter: baseType: referenced type
parameter: refCount: pointer depth
return: created reference type

## Method: createReference
- parameter: `baseType`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IReferenceType`

Description: Create a new simple pointer type.
parameter: baseType: referenced type
return: created reference type

## Method: createStructure
- parameter: `signature`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureType`

Description: Convenience method. Create a structure with a padding of 1 byte and no alignment.
parameter: signature: structure signature
return: created structure type

## Method: createStructure
- parameter: `signature`, type: `java.lang.String`
- parameter: `nameAndTypes`, type: `java.lang.String[]`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureType`

Description: Convenience method. Create a structure with a padding of 1 byte and no alignment. Add a series of fields as specified by the `nameAndTypes` parameter.
parameter: signature: structure signature
parameter: nameAndTypes: sequence of \(fieldName, fieldTypeName, ...\) for fields
return: created structure type

## Method: createStructureOrUnion
- parameter: `signature`, type: `java.lang.String`
- parameter: `padding`, type: `int`
- parameter: `alignment`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureType`

Description: Create a new structure or union type. Fields can be added after the type is created.
parameter: signature: structure or union signature
parameter: padding: padding in bytes between fields; **0 means that type is a union**
parameter: alignment: alignment in bytes; the structure/union will have at least that size
return: created structure or union type

## Method: createUnion
- parameter: `signature`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureType`

Description: Convenience method. Create a union with no alignment.
parameter: signature: union signature
return: created union type

## Method: createVirtualTableDefinition
- parameter: `vtableStructSig`, type: `java.lang.String`
- parameter: `address`, type: `java.lang.Long`
- parameter: `methods`, type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.asm.items.INativeMethodItem>`
- return type: `com.pnfsoftware.jeb.util.base.Couple<com.pnfsoftware.jeb.core.units.code.asm.type.IVirtualTableDefinition,com.pnfsoftware.jeb.core.units.code.asm.items.IMethodTable>`

Description: Create a virtual table definition.
parameter: vtableStructSig: signature of the to\-be\-created structure that will hold the virtual            methods
parameter: address: optional memory address of the virtual table, if concrete
parameter: methods: list of methods in the virtual table
return: a couple holding the virtual table definition and backing method table

## Method: deleteType
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- return type: `boolean`

Description: Delete a type.
parameter: type: type to delete
return: success indicator

## Method: getCallingConventionManager
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConventionManager`

Description: Retrieve the calling convention manager.
return: the calling convention manager

## Method: getCompilerType
- return type: `com.pnfsoftware.jeb.core.units.codeobject.CompilerType`

Description: Retrieve the compiler type associated with this type manager.
return: compiler type, or null

## Method: getExactFloat
- parameter: `size`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`

Description: Find a floating\-point or equivalent type of the exact provided size. The returned type may be a primitive or an alias to a primitive.
parameter: size: exact size in bytes
return: floating\-point type, or null if none is available

## Method: getExactInteger
- parameter: `size`, type: `int`
- parameter: `signed`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`

Description: Find an integer or equivalent type of the exact provided size. The returned type may be a primitive or an alias to a primitive.
parameter: size: exact size in bytes
parameter: signed: signedness
return: integer type, or null if none is available

## Method: getInteger
- parameter: `minsize`, type: `int`
- parameter: `signed`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`

Description: Find an integer or equivalent type of at least the provided size. The returned type may be a primitive or an alias to a primitive.
parameter: minsize: minimal size in bytes
parameter: signed: signedness
return: integer type, or null if none is available

## Method: getParser
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.TypeStringParser`

Description: Retrieve a type string parser that can parse type and prototype strings to type and prototype items and register them with this type manager.
return: type string parser

## Method: getPointerSize
- return type: `int`

Description: Get a pointer size in bytes.
return: pointer size in bytes

## Method: getPrimitives
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IPrimitiveTypeManager`

Description: Retrieve the primitive types manager.
return: the primitive types manager

## Method: getProcessorType
- return type: `com.pnfsoftware.jeb.core.units.codeobject.ProcessorType`

Description: Retrieve the processor type associated with this type manager.
return: processor type

## Method: getPrototypes
- return type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.asm.type.IPrototypeItem>`

Description: Retrieve the prototypes managed by this manager.
return: managed prototype collection

## Method: getSlotSize
- return type: `int`

Description: Get the size of a stack slot in bytes. Typically, this would be the size of a general\-purpose register.
return: stack slot size in bytes

## Method: getSubsystemType
- return type: `com.pnfsoftware.jeb.core.units.codeobject.SubsystemType`

Description: Retrieve the subsystem type associated with this type manager.
return: subsystem type, or null

## Method: getType
- parameter: `signature`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`

Description: Retrieve a type by effective signature. The type returned can be one managed by this type manager, a primitive returned by the primitive type manager, or a type imported from the optional TLS, if one is present.
parameter: signature: fully\-qualified name \(original or effective\)
return: the type or null if not found

## Method: getType
- parameter: `signature`, type: `java.lang.String`
- parameter: `allowImportingFromTypelibs`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`

Description: Retrieve a type by effective signature. The type returned can be one managed by this type manager, a primitive returned by the primitive type manager, or a type imported from the optional TLS, if one is present.
parameter: signature: fully\-qualified name \(original or effective\)
parameter: allowImportingFromTypelibs: true to allow importing types
return: the type or null if not found

## Method: getType
- parameter: `signature`, type: `java.lang.String`
- parameter: `allowImportingFromTypelibs`, type: `boolean`
- parameter: `mayBeRenamed`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`

Description: Retrieve a type by effective signature. The type returned can be one managed by this type manager, a primitive returned by the primitive type manager, or a type imported from the optional TLS, if one is present.
parameter: signature: fully\-qualified name \(original or effective\)
parameter: allowImportingFromTypelibs: true to allow importing types
parameter: mayBeRenamed: if false, only original names will be checked
return: the type or null if not found

## Method: getTypeLibraryService
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.TypeLibraryService`

Description: Retrieve the optional type library service \(TLS\) connected to this manager. The TLS is a source of external types of prototypes. If a TLS is present, its types can be transparently imported and retrieved via [#getType(String)](#getType(String)).
return: the optional TLS

## Method: getTypes
- return type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.asm.type.INativeType>`

Description: Retrieve the types currently managed by this manager. The following types are not returned:
 \- reference types \(pointers\)
 \- array types
 \- primitives \(they are managed by the [primitive type manager](#getPrimitives())\)
 \- prototypes \(see [#getPrototypes()](#getPrototypes())
return: managed type collection

## Method: getTypes
- parameter: `filter`, type: `com.pnfsoftware.jeb.util.base.ISimpleFilter<com.pnfsoftware.jeb.core.units.code.asm.type.INativeType>`
- return type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.asm.type.INativeType>`

Description: Retrieve the types currently managed by this manager. The following types are not returned:
 \- reference types \(pointers\)
 \- array types
 \- primitives \(they are managed by the [primitive type manager](#getPrimitives())\)
 \- prototypes \(see [#getPrototypes()](#getPrototypes())
parameter: filter: optional type filter
return: managed type collection

## Method: getVoid
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`

Description: Get the void pseudo\-type.
return: void pseudo\-type

## Method: getVoidReference
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.IReferenceType`

Description: Retrieve a pointer to the void pseudo\-type.
return: void pointer type

## Method: removeListener
- parameter: `listener`, type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeItemListener`

Description: Unregister a listener.
parameter: listener: listener to unregister

## Method: removeStructureField
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureType`
- parameter: `field`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`
- return type: `boolean`

Description: Remove a field from a structure type item.
parameter: type: structure type
parameter: field: field to remove
return: true if the field was removed

## Method: renameStructureField
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureType`
- parameter: `fieldName`, type: `java.lang.String`
- parameter: `newFieldName`, type: `java.lang.String`
- return type: `boolean`

Description: Rename a structure field.
parameter: type: structure type
parameter: fieldName: current field name
parameter: newFieldName: new field name
return: true if the field was renamed

## Method: renameStructureField
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureType`
- parameter: `field`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IStructureTypeField`
- parameter: `newFieldName`, type: `java.lang.String`
- return type: `boolean`

Description: Rename a structure field.
parameter: type: structure type
parameter: field: field to rename
parameter: newFieldName: new field name
return: true if the field was renamed

## Method: setClassSuperTypes
- parameter: `c`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IClassType`
- parameter: `supertypes`, type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.asm.type.IClassType>`
- parameter: `vtables`, type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.asm.type.IVirtualTableDefinition>`

Description: Set up the list of super types and associated virtual tables of a class. If used, [#setClassVirtualTable(IClassType, IVirtualTableDefinition)](#setClassVirtualTable(IClassType, IVirtualTableDefinition)) cannot be used.
parameter: c: class type
parameter: supertypes: a list of super types
parameter: vtables: optional list of virtual tables \(may be null\)

## Method: setClassVirtualTable
- parameter: `c`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IClassType`
- parameter: `vtable`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IVirtualTableDefinition`

Description: Set up the \(single\) virtual table of a class that has no super class. If used, [#setClassSuperTypes(IClassType, Collection, Collection)](#setClassSuperTypes(IClassType, Collection, Collection)) cannot be used.
parameter: c: class type to update
parameter: vtable: mandatory virtual table

## Method: verify
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`

Description: Verify that the provided type belongs to this type manager; raise if it's not the case.
parameter: type: non\-null type
throws: if the verification failed

