public interface

IWildcardType

implements INativeItem Comparable<T>
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IWildcardType

Class Overview

Wildcard types can be defined (they wrap native types) or undefined (they contain a set of attributes partially defining the actual type, such as effective size, group, signedness, etc.).

Summary

Nested Classes
enum IWildcardType.Group Group (category) of a wildcard type. 
[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.ICodeItem
Public Methods
abstract int getBitsize()
The currently determined size of this wildcard type.
abstract int getEffectiveBitsize()
The currently set effective size for an undefined wildcard type.
abstract IWildcardType.Group getGroup()
abstract TypeLayoutInfo getLayoutInfo()
abstract int getMaximumBitsize()
Maximum effective size for an undefined wildcard type.
abstract INativeType getNativeType()
If the wildcard type is defined, provide the wrapped native type.
abstract int getPointedBitsize()
abstract IWildcardType.Group getPointedGroup()
abstract int getPointedSize()
abstract int getSlotCount()
Determine the number of stack slots currently required to accommodate this wildcard type.
abstract boolean isDefined()
Determine if this wildcard type is fully defined, ie, it wraps a native type.
abstract boolean isEquivalent(IWildcardType otherType)
An extended #equals(Object) equality check, that checks unaliased native types (if both wildcard types are resolved).
abstract boolean isFloat()
abstract boolean isInteger()
Determine whether this wildcard type represents an integer (it could be defined or partially defined).
abstract boolean isLessSpecializedThan(IWildcardType o)
Determine if this wildcard type appears to be less specialized than the provided parameter wildcard type.
abstract boolean isPartiallyDefined()
Determine if this wildcard type is partially defined: it does not wrap a native type, but does contain preliminary type information, such as the effective size, group, signedness, etc.
abstract boolean isPointer()
abstract boolean isResolved()
Determine if this wildcard type is fully defined, ie, it wraps a native type.
abstract boolean isSigned()
Determine whether this wildcard type represents a signed integer (it could be defined or partially defined).
abstract boolean isUndefined()
Determine if this wildcard type is entirely undefined: it does not wrap a native type and does not contain any preliminary type information.
abstract boolean isUnsigned()
Determine whether this wildcard type represents an unsigned integer (it could be defined or partially defined).
abstract boolean isUpdatable()
Determine if this wildcard type can be updated.
abstract boolean isVoid()
abstract boolean isWildcardPointer()
abstract IWildcardType resolveA()
Attempt to resolve the wildcard type, ie, generate a defined wildcard type (wrapping a primitive) from this possibly undefined wildcard type.
abstract IWildcardType resolveU()
Resolve the wildcard type, ie, generate a defined wildcard type (wrapping a primitive) from this possibly undefined wildcard type.
abstract String toString(boolean compact)
Generate a string representation of this wildcard type.
abstract String toString()
Generate a compact representation of the type.
abstract IWildcardType updateEffectiveBitsize(int newEffectiveBitsize)
abstract IWildcardType updateGroup(IWildcardType.Group group)
abstract IWildcardType updateMaxBitsize(int newMaxBitsize)
abstract IWildcardType updatePointedBitsize(int newPointedBitsize)
abstract IWildcardType updatePointedGroup(IWildcardType.Group newPointedGroup)
abstract IWildcardType updateProperties(IWildcardType srctype)
Soft-transfer the properties of a source type to this type.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.ICodeItem
From interface com.pnfsoftware.jeb.core.units.code.asm.items.INativeItem
From interface com.pnfsoftware.jeb.core.units.code.asm.items.INativeItemListenable
From interface java.lang.Comparable

Public Methods

public abstract int getBitsize ()

The currently determined size of this wildcard type. If defined, it is trivial. If undefined, it is either the maximum bitsize or the effective bitsize (if non-zero).

Returns
  • always >0

public abstract int getEffectiveBitsize ()

The currently set effective size for an undefined wildcard type. If 0, it means the effective size is unknown and should be considered equal to the maximum size.

Returns
  • possibly 0 if undetermined

public abstract IWildcardType.Group getGroup ()

Returns
  • possibly null if unknown

public abstract TypeLayoutInfo getLayoutInfo ()

public abstract int getMaximumBitsize ()

Maximum effective size for an undefined wildcard type.

Returns
  • always >0

public abstract INativeType getNativeType ()

If the wildcard type is defined, provide the wrapped native type.

public abstract int getPointedBitsize ()

Returns
  • possibly 0 if unknown

public abstract IWildcardType.Group getPointedGroup ()

Returns
  • possibly null if unknown

public abstract int getPointedSize ()

Returns
  • possibly 0 if unknown

public abstract int getSlotCount ()

Determine the number of stack slots currently required to accommodate this wildcard type.

public abstract boolean isDefined ()

Determine if this wildcard type is fully defined, ie, it wraps a native type.

public abstract boolean isEquivalent (IWildcardType otherType)

An extended #equals(Object) equality check, that checks unaliased native types (if both wildcard types are resolved).

public abstract boolean isFloat ()

public abstract boolean isInteger ()

Determine whether this wildcard type represents an integer (it could be defined or partially defined).

public abstract boolean isLessSpecializedThan (IWildcardType o)

Determine if this wildcard type appears to be less specialized than the provided parameter wildcard type.

Note: "Specialized" within the context of this class and wildcard types has a meaning different than the one used by type systems for hierarchy of type objects.

Same as #compareTo(IWildcardType) compareTo(o)<0

Parameters
o another type

public abstract boolean isPartiallyDefined ()

Determine if this wildcard type is partially defined: it does not wrap a native type, but does contain preliminary type information, such as the effective size, group, signedness, etc.

public abstract boolean isPointer ()

public abstract boolean isResolved ()

Determine if this wildcard type is fully defined, ie, it wraps a native type.

Same as isDefined().

public abstract boolean isSigned ()

Determine whether this wildcard type represents a signed integer (it could be defined or partially defined).

public abstract boolean isUndefined ()

Determine if this wildcard type is entirely undefined: it does not wrap a native type and does not contain any preliminary type information.

public abstract boolean isUnsigned ()

Determine whether this wildcard type represents an unsigned integer (it could be defined or partially defined).

public abstract boolean isUpdatable ()

Determine if this wildcard type can be updated. Undefined wildcard types can be updated, whereas most defined wildcard types (wrapping native types) cannot be updated, except for some primitives.

Note that wildcard types are immutable, the process of updating them will always yield the creation of a new wildcard type.

public abstract boolean isVoid ()

Returns
  • true if this wildcard type wraps the native void type

public abstract boolean isWildcardPointer ()

public abstract IWildcardType resolveA ()

Attempt to resolve the wildcard type, ie, generate a defined wildcard type (wrapping a primitive) from this possibly undefined wildcard type.

This method does not throw on error (if the wildcard type cannot be resolved). To determine whether or not the returned type was really resolved, use isResolved().

Returns
  • a resolved type or the same (this) type if the resolution failed

public abstract IWildcardType resolveU ()

Resolve the wildcard type, ie, generate a defined wildcard type (wrapping a primitive) from this possibly undefined wildcard type.

This method throws an IllegalStateException on error (if the wildcard type cannot be resolved).

Returns
  • never null

public abstract String toString (boolean compact)

Generate a string representation of this wildcard type. Examples with slotsize= 32 bits:

 ??       => slot=1, esize=unk, group=unk (normal representation)
 ?        => slot=1, esize=unk, group=unk (same, compact representation)
 ??32     => slot=1, esize=32,  group=unk (normal representation)
 ?32      => slot=1, esize=32,  group=unk (same, compact representation)
 ??/64    => slot=2, esize=unk, group=unk
 ??32/64  => slot=2, esize=32,  group=unk
 ?I       => slot=1, esize=unk, group=int
 ?I32     => slot=1, esize=32,  group=int
 ?U       =>
 ?U64     => slot=2, esize=64,  group=uint (note that 2 full slots are used, but /64 is not appended since it matches the esize)
 ?F       =>
 ?F32     =>
 ?F64     =>
 ?F32/64  =>
 ?F/64    =>
 ?P       => slot=1, psize=unk, group=ptr
 ?P32     => slot=1, psize=32,  group=ptr
 ?P32/64  => slot=2, psize=32,  group=ptr
 
 

Parameters
compact true to generate a compact representation: avoid double '?' sequences, do not append the physical bitsize ('/NN') after the type in cases where it's not equal to a slot size
Returns
  • a string representation of the type

public abstract String toString ()

Generate a compact representation of the type. Same as toString(true).

Returns
  • a compact representation of the type

public abstract IWildcardType updateEffectiveBitsize (int newEffectiveBitsize)

public abstract IWildcardType updateGroup (IWildcardType.Group group)

public abstract IWildcardType updateMaxBitsize (int newMaxBitsize)

public abstract IWildcardType updatePointedBitsize (int newPointedBitsize)

public abstract IWildcardType updatePointedGroup (IWildcardType.Group newPointedGroup)

public abstract IWildcardType updateProperties (IWildcardType srctype)

Soft-transfer the properties of a source type to this type.

Returns
  • a new type (or this type if no update was performed)