Interface IWildcardTypeManager

All Superinterfaces:
INativeItemListenable

@Ser public interface IWildcardTypeManager extends INativeItemListenable
A wildcard type manager manages wildcard types (partially defined types) used by JEB's native decompiler.
  • Method Details

    • addListener

      void addListener(INativeItemListener listener)
      Register a listener relaying events generated by this type manager's type items.
      Specified by:
      addListener in interface INativeItemListenable
      Parameters:
      listener -
    • removeListener

      void removeListener(INativeItemListener listener)
      Unregister a listener.
      Specified by:
      removeListener in interface INativeItemListenable
      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

      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.
      Parameters:
      nativeTypeSignature -
      Returns:
    • create

      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.
      Parameters:
      nativeType -
      Returns:
    • createWithMaximumBitsize

      IWildcardType createWithMaximumBitsize(int maximumBitsize)
      Create a wildcard type having the provided maximum bitsize.
      Parameters:
      maximumBitsize - maximum bitsize
      Returns:
    • createWithSlotcount

      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.

      Parameters:
      slotcount -
      Returns:
    • createWithBitsizes

      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
      Returns:
    • createWithEffectiveBitsize

      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.
      Parameters:
      effectiveBitsize -
      Returns:
    • createPointer

      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
    • 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

      IWildcardPrototype createPrototype(IPrototypeItem nativePrototype)
      Generate a wildcard prototype from the provided native prototype.
      Parameters:
      nativePrototype - a native prototype
      Returns:
      the converted wildcard prototype
    • parse

      default 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)
    • parse

      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)