public interface

IJavaType

com.pnfsoftware.jeb.core.units.code.java.IJavaType

Class Overview

This interface is used to define a Java type.

Summary

Constants
String JAVA_LANG_CLASS
String JAVA_LANG_ENUM
String JAVA_LANG_INVOKE_CALLSITE
String JAVA_LANG_INVOKE_METHODHANDLE
String JAVA_LANG_INVOKE_METHODTYPE
String JAVA_LANG_OBJECT
String JAVA_LANG_STRING
String JAVA_LANG_THROWABLE
Public Methods
abstract boolean canSetType(IJavaType new_type, boolean useExternalTypeInfo)
abstract IJavaType compareAndGetBest(IJavaType other)
abstract IJavaType compareAndGetMostPrecise(IJavaType other)
abstract boolean compareSimple(IJavaType t)
Simple comparison: are both types objects (incl.
abstract void format(DFormattingContext fctx)
abstract void formatArray(DFormattingContext fctx, IDExpression dim0)
abstract String formatArrayWithDimensions(String[] str_dimensions)
Format an array (standard representation) with actual dimensions.
abstract IJavaType getArrayElementType()
Get the simplest type of an array type, that is, the type of a 0-dimension array.
abstract IJavaType getArrayTypeDimensionBelow()
Get the type of an imaginary array with one dimension less than the current array.
abstract int getDimensions()
Get the dimension count of an array type.
abstract IJavaTypeFactory getFactory()
abstract String getName()
Get the internal representation.
abstract String getSignature()
Get the Java type name (internal form).
abstract int getSlotCount()
abstract boolean isArray()
abstract boolean isBool()
abstract boolean isBoolean()
abstract boolean isByte()
abstract boolean isChar()
abstract boolean isClassOrInterface()
abstract boolean isDefined()
abstract boolean isDetermined()
abstract boolean isDouble()
abstract boolean isDoubleRegister()
abstract boolean isDoubleSlotWildcard()
abstract boolean isFloat()
abstract boolean isFloatingPoint()
abstract boolean isGenericInteger()
isSpecificInteger() + BOOLEAN and the generic type SMALLINT.
abstract boolean isGenericObject()
abstract boolean isInt()
abstract boolean isLegal()
abstract boolean isLong()
abstract boolean isObject()
abstract boolean isObjectType()
abstract boolean isPrimitive()
abstract boolean isShort()
abstract boolean isSingleRegister()
abstract boolean isSingleSlotWildcard()
abstract boolean isSmallInt()
small int or wildcard small Int
abstract boolean isSmallIntegerWildcard()
abstract boolean isSpecificInteger()
True if byte, char, short, int or long.
abstract boolean isStringType()
abstract boolean isValidForRendering()
abstract boolean isVoid()
abstract boolean isWildcard()

Constants

public static final String JAVA_LANG_CLASS

Constant Value: "Ljava/lang/Class;"

public static final String JAVA_LANG_ENUM

Constant Value: "Ljava/lang/Enum;"

public static final String JAVA_LANG_INVOKE_CALLSITE

Constant Value: "Ljava/lang/invoke/CallSite;"

public static final String JAVA_LANG_INVOKE_METHODHANDLE

Constant Value: "Ljava/lang/invoke/MethodHandle;"

public static final String JAVA_LANG_INVOKE_METHODTYPE

Constant Value: "Ljava/lang/invoke/MethodType;"

public static final String JAVA_LANG_OBJECT

Constant Value: "Ljava/lang/Object;"

public static final String JAVA_LANG_STRING

Constant Value: "Ljava/lang/String;"

public static final String JAVA_LANG_THROWABLE

Constant Value: "Ljava/lang/Throwable;"

Public Methods

public abstract boolean canSetType (IJavaType new_type, boolean useExternalTypeInfo)

public abstract IJavaType compareAndGetBest (IJavaType other)

public abstract IJavaType compareAndGetMostPrecise (IJavaType other)

public abstract boolean compareSimple (IJavaType t)

Simple comparison: are both types objects (incl. arrays) or ints, etc.

Note 1: comparing a String to an ArrayList or an array of int would return true.
Note 2: comparing an int to a smallint would return false.

public abstract void format (DFormattingContext fctx)

public abstract void formatArray (DFormattingContext fctx, IDExpression dim0)

public abstract String formatArrayWithDimensions (String[] str_dimensions)

Format an array (standard representation) with actual dimensions.

Parameters
str_dimensions values for dimensions; must be less or equal than the number of dimensions for the type

public abstract IJavaType getArrayElementType ()

Get the simplest type of an array type, that is, the type of a 0-dimension array.
Example: [[[I -> I

public abstract IJavaType getArrayTypeDimensionBelow ()

Get the type of an imaginary array with one dimension less than the current array.
Example: [[[I -> [[I

public abstract int getDimensions ()

Get the dimension count of an array type. This method will throw if this type is not an array.

public abstract IJavaTypeFactory getFactory ()

public abstract String getName ()

Get the internal representation. Never fail.

Returns
  • internal representation of the type name

public abstract String getSignature ()

Get the Java type name (internal form).

Returns
  • internal type name, using the L.../...; form

public abstract int getSlotCount ()

public abstract boolean isArray ()

public abstract boolean isBool ()

public abstract boolean isBoolean ()

public abstract boolean isByte ()

public abstract boolean isChar ()

public abstract boolean isClassOrInterface ()

public abstract boolean isDefined ()

public abstract boolean isDetermined ()

public abstract boolean isDouble ()

public abstract boolean isDoubleRegister ()

public abstract boolean isDoubleSlotWildcard ()

public abstract boolean isFloat ()

public abstract boolean isFloatingPoint ()

public abstract boolean isGenericInteger ()

isSpecificInteger() + BOOLEAN and the generic type SMALLINT.

public abstract boolean isGenericObject ()

public abstract boolean isInt ()

public abstract boolean isLegal ()

public abstract boolean isLong ()

public abstract boolean isObject ()

public abstract boolean isObjectType ()

public abstract boolean isPrimitive ()

public abstract boolean isShort ()

public abstract boolean isSingleRegister ()

public abstract boolean isSingleSlotWildcard ()

public abstract boolean isSmallInt ()

small int or wildcard small Int

public abstract boolean isSmallIntegerWildcard ()

public abstract boolean isSpecificInteger ()

True if byte, char, short, int or long.

public abstract boolean isStringType ()

public abstract boolean isValidForRendering ()

public abstract boolean isVoid ()

public abstract boolean isWildcard ()