Interface IWildcardTypeManager
- All Superinterfaces:
INativeItemListenable
A wildcard type manager manages wildcard types (partially defined types) used by JEB's native
decompiler.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(INativeItemListener listener) Register a listener relaying events generated by this type manager's type items.create(INativeType nativeType) Create a wildcard type wrapping the provided native type.Create a wildcard type wrapping the provided native type signature.createPointer(int pointedBitsize) Create a wildcard type pointer.createPrototype(ICallingConvention cc, IWildcardType retType, List<IWildcardType> paramTypes, Collection<PrototypeAttribute> attributes) Create a wildcard prototype.createPrototype(ICallingConvention cc, List<IWildcardType> returnTypes, List<IWildcardType> paramTypes, Collection<PrototypeAttribute> attributes) Create a wildcard prototype.createPrototype(IPrototypeItem nativePrototype) Generate a wildcard prototype from the provided native prototype.createWithBitsizes(int maximumBitsize, int effectiveBitsize) Create a wildcard type having the provided maximum and effective bitsize.createWithEffectiveBitsize(int effectiveBitsize) Create a wildcard type having the provided effective bitsize.createWithMaximumBitsize(int maximumBitsize) Create a wildcard type having the provided maximum bitsize.createWithSlotcount(int slotcount) Create a wildcard type having a maximum bitsize matching the provided slot count (eg, if a stack slot is 32-bit, creating a wildcard type using this method with parameter 2 will generate a new wildcard type whose maximum bitsize is 64).Retrieve the native type manager connected to this wildcard type manager.intintdefault IWildcardTypeParse the string representation of a wildcard type.Parse the string representation of a wildcard type.voidremoveListener(INativeItemListener listener) Unregister a listener.
-
Method Details
-
addListener
Register a listener relaying events generated by this type manager's type items.- Specified by:
addListenerin interfaceINativeItemListenable- Parameters:
listener-
-
removeListener
Unregister a listener.- Specified by:
removeListenerin interfaceINativeItemListenable- Parameters:
listener-
-
getNativeTypeManager
ITypeManager getNativeTypeManager()Retrieve the native type manager connected to this wildcard type manager.- Returns:
-
getSlotBitsize
int getSlotBitsize()- Returns:
-
getPointerBitsize
int getPointerBitsize()- Returns:
-
create
Create a wildcard type wrapping the provided native type signature. This is the easiest way to create a wildcard type that is an exact correspondence of a native type.- Parameters:
nativeTypeSignature-- Returns:
-
create
Create a wildcard type wrapping the provided native type. This is the easiest way to create a wildcard type that is an exact correspondence of a native type.- Parameters:
nativeType-- Returns:
-
createWithMaximumBitsize
Create a wildcard type having the provided maximum bitsize.- Parameters:
maximumBitsize- maximum bitsize- Returns:
-
createWithSlotcount
Create a wildcard type having a maximum bitsize matching the provided slot count (eg, if a stack slot is 32-bit, creating a wildcard type using this method with parameter 2 will generate a new wildcard type whose maximum bitsize is 64).A slot is typically the size of a standard general purpose register.
- Parameters:
slotcount-- Returns:
-
createWithBitsizes
Create a wildcard type having the provided maximum and effective bitsize.- Parameters:
maximumBitsize- maximum bitsizeeffectiveBitsize- must be less than or equal to maximum bitsize- Returns:
-
createWithEffectiveBitsize
Create a wildcard type having the provided effective bitsize. The maximum bitsize will be the one of the smallest native integer primitive type that can accommodate the provided effective bitsize.- Parameters:
effectiveBitsize-- Returns:
-
createPointer
Create a wildcard type pointer. Important note: the maximum size is set to be the size of one stack slot, ie, a stack slot is supposed to be able to contain a pointer.- Parameters:
pointedBitsize- 0 means unknown- Returns:
- a single-slot wildcard type set to be a
pointer
-
createPrototype
IWildcardPrototype createPrototype(ICallingConvention cc, IWildcardType retType, List<IWildcardType> paramTypes, Collection<PrototypeAttribute> attributes) Create a wildcard prototype.- Parameters:
cc-retType-paramTypes-attributes-- Returns:
-
createPrototype
IWildcardPrototype createPrototype(ICallingConvention cc, List<IWildcardType> returnTypes, List<IWildcardType> paramTypes, Collection<PrototypeAttribute> attributes) Create a wildcard prototype.- Parameters:
cc-returnTypes-paramTypes-attributes-- Returns:
-
createPrototype
Generate a wildcard prototype from the provided native prototype.- Parameters:
nativePrototype- a native prototype- Returns:
- the converted wildcard prototype
-
parse
Parse the string representation of a wildcard type.Same as
parse(s, 0)- Parameters:
s- type string- Returns:
- the type (never null; the method throws on error)
-
parse
Parse the string representation of a wildcard type.- Parameters:
s- type stringphysicalBitsizeHint- optional, used only if the type string does not provide explicit physical bitsize; 0 means use the type string physical bitsize or else, the bitsize of a single slot- Returns:
- the type (never null; the method throws on error)
-