# 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: 

## 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: 

## 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: 

## 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: 

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

Description: 
parameter: 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: 
parameter: aliasedType: 
return: 

## 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: 
parameter: aliasedTypeSignature: 
return: 

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

Description: 
parameter: baseTypeName: 
parameter: arraySize: 
return: 

## 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: 
parameter: arraySize: 
return: 

## 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: 

## 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: 
return: 

## 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: 
parameter: padding: 
parameter: alignment: 
return: 

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

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

## 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: 
parameter: returnTypes: 
parameter: parameterTypes: 
parameter: attributes: 
return: 

## 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: 
parameter: returnTypes: 
parameter: parameterTypes: 
parameter: attributes: 
return: 

## 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: 
parameter: refCount: 
return: 

## 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: 
return: 

## 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: 
return: 

## 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: 
parameter: nameAndTypes: sequence of \(fieldName, fieldTypeName, ...\) for fields
return: 

## 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: 
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: 

## 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: 
return: 

## 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: 
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

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

Description: Delete a type.
parameter: type: 
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: 
return: may be 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: 

## 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: 

## 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: 

## 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: 

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

Description: Get a pointer size in bytes.
return: 

## 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: 
return: 

## 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: 

## 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: 

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

Description: 
return: may be 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: 

## 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
return: 

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

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

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

Description: 
return: 

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

Description: Unregister a listener.
parameter: listener: 

## 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: 
parameter: field: 
return: 

## 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: 
parameter: type: 
parameter: fieldName: 
parameter: newFieldName: 
return: 

## 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: 
parameter: type: 
parameter: field: 
parameter: newFieldName: 
return: 

## 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: 
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: 
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

