public interface

IWildcardTypeManager

implements INativeItemListenable
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IWildcardTypeManager

Class Overview

A wildcard type manager manages wildcard types (partially defined types) used by JEB's native decompiler.

Summary

Public Methods
abstract void addListener(INativeItemListener listener)
Register a listener relaying events generated by this type manager's type items.
abstract IWildcardType create(String nativeTypeSignature)
Create a wildcard type wrapping the provided native type signature.
abstract IWildcardType create(INativeType nativeType)
Create a wildcard type wrapping the provided native type.
abstract IWildcardType createPointer(int pointedBitsize)
Create a wildcard type pointer.
abstract IWildcardPrototype createPrototype(ICallingConvention cc, IWildcardType retType, List<IWildcardType> paramTypes, Collection<PrototypeAttribute> attributes)
Create a wildcard prototype.
abstract IWildcardPrototype createPrototype(IPrototypeItem nativePrototype)
Generate a wildcard prototype from the provided native prototype.
abstract IWildcardPrototype createPrototype(ICallingConvention cc, List<IWildcardType> returnTypes, List<IWildcardType> paramTypes, Collection<PrototypeAttribute> attributes)
Create a wildcard prototype.
abstract IWildcardType createWithBitsizes(int maximumBitsize, int effectiveBitsize)
Create a wildcard type having the provided maximum and effective bitsize.
abstract IWildcardType createWithEffectiveBitsize(int effectiveBitsize)
Create a wildcard type having the provided effective bitsize.
abstract IWildcardType createWithMaximumBitsize(int maximumBitsize)
Create a wildcard type having the provided maximum bitsize.
abstract IWildcardType 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).
abstract ITypeManager getNativeTypeManager()
Retrieve the native type manager connected to this wildcard type manager.
abstract int getPointerBitsize()
abstract int getSlotBitsize()
abstract IWildcardType parse(String s)
Parse the string representation of a wildcard type.
abstract IWildcardType parse(String s, int physicalBitsizeHint)
Parse the string representation of a wildcard type.
abstract void removeListener(INativeItemListener listener)
Unregister a listener.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.asm.items.INativeItemListenable

Public Methods

public abstract void addListener (INativeItemListener listener)

Register a listener relaying events generated by this type manager's type items.

public abstract IWildcardType create (String nativeTypeSignature)

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.

public abstract IWildcardType create (INativeType nativeType)

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.

public abstract IWildcardType createPointer (int pointedBitsize)

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

public abstract IWildcardPrototype createPrototype (ICallingConvention cc, IWildcardType retType, List<IWildcardType> paramTypes, Collection<PrototypeAttribute> attributes)

Create a wildcard prototype.

public abstract IWildcardPrototype createPrototype (IPrototypeItem nativePrototype)

Generate a wildcard prototype from the provided native prototype.

Parameters
nativePrototype a native prototype
Returns
  • the converted wildcard prototype

public abstract IWildcardPrototype createPrototype (ICallingConvention cc, List<IWildcardType> returnTypes, List<IWildcardType> paramTypes, Collection<PrototypeAttribute> attributes)

Create a wildcard prototype.

public abstract IWildcardType createWithBitsizes (int maximumBitsize, int effectiveBitsize)

Create a wildcard type having the provided maximum and effective bitsize.

Parameters
maximumBitsize maximum bitsize
effectiveBitsize must be less than or equal to maximum bitsize

public abstract IWildcardType createWithEffectiveBitsize (int effectiveBitsize)

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.

public abstract IWildcardType createWithMaximumBitsize (int maximumBitsize)

Create a wildcard type having the provided maximum bitsize.

Parameters
maximumBitsize maximum bitsize

public abstract IWildcardType 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).

A slot is typically the size of a standard general purpose register.

public abstract ITypeManager getNativeTypeManager ()

Retrieve the native type manager connected to this wildcard type manager.

public abstract int getPointerBitsize ()

public abstract int getSlotBitsize ()

public abstract IWildcardType parse (String s)

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)

public abstract IWildcardType parse (String s, int physicalBitsizeHint)

Parse the string representation of a wildcard type.

Parameters
s type string
physicalBitsizeHint 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)

public abstract void removeListener (INativeItemListener listener)

Unregister a listener.