Interface Types
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe types that may be ascribed to local variables in JVM bytecodestatic interfaceThe primitive types that may be ascribed to local variables in JVM bytecodestatic interfaceThe types that may be ascribed to local variables in JVM bytecode, andvoidstatic interfaceTypes that may be ascribed to a variable in Java sourcestatic interfaceThe primitive types that may be ascribed to a variable in Java sourcestatic interfaceTypes that may be returned by a method in Java sourcestatic enumThebooleantypestatic enumThebytetypestatic interfaceCategory 1 types as defined by the JVM specificationstatic interfaceCategory 2 types as defined by the JVM specificationstatic enumThechartypestatic enumThedoubletypestatic enumThefloattypestatic enumTheinttypestatic enumThelongtypestatic final recordReference typesstatic enumTheshorttypestatic enumThevoidtype -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Types.TBoolThebooleantypestatic final Types.TRef<boolean[]> Theboolean[]typestatic final Types.TByteThebytetypestatic final Types.TRef<byte[]> Thebyte[]typestatic final Types.TCharThechartypestatic final Types.TRef<char[]> Thechar[]typestatic final Types.TDoubleThedoubletypestatic final Types.TRef<double[]> Thedouble[]typestatic final Types.TFloatThefloattypestatic final Types.TRef<float[]> Thefloat[]typestatic final Types.TIntTheinttypestatic final Types.TRef<int[]> Theint[]typestatic final Types.TLongThelongtypestatic final Types.TRef<long[]> Thelong[]typestatic final Types.TShortTheshorttypestatic final Types.TRef<short[]> Theshort[]typestatic final Types.TVoidThevoidtype -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <ST,T extends ST>
Types.TRef<T> refExtends(Types.TRef<ST> st, Class<?> reflected) Create a type describing a reflected extension of a given class (or interface) typestatic <ST,T extends ST>
Types.TRef<T> refExtends(Types.TRef<ST> st, String desc) static <ST,T extends ST>
Types.TRef<T> refExtends(Class<ST> cls, String desc) Create a type describing an extension of the given class (or interface) typestatic <T> Types.TRef<T> Create a type describing a reference of the given class (or interface) type
-
Field Details
-
T_VOID
Thevoidtype -
T_BOOL
Thebooleantype -
T_BYTE
Thebytetype -
T_CHAR
Thechartype -
T_SHORT
Theshorttype -
T_INT
Theinttype -
T_LONG
Thelongtype -
T_FLOAT
Thefloattype -
T_DOUBLE
Thedoubletype -
T_BOOL_ARR
Theboolean[]type -
T_BYTE_ARR
Thebyte[]type -
T_CHAR_ARR
Thechar[]type -
T_SHORT_ARR
Theshort[]type -
T_INT_ARR
Theint[]type -
T_LONG_ARR
Thelong[]type -
T_FLOAT_ARR
Thefloat[]type -
T_DOUBLE_ARR
Thedouble[]type
-
-
Method Details
-
refOf
Create a type describing a reference of the given class (or interface) type- Type Parameters:
T- the type of the Java class- Parameters:
cls- the class- Returns:
- the type
-
refExtends
Create a type describing an extension of the given class (or interface) typeThis is used when the type is itself dynamically generated, but it is at least known to extend a type defined by compiled Java source. This is best used with a type variable on the class in the Java source that generates the type. Unfortunately, that variable may bleed into any number of classes and methods which support that generation, esp., since this is almost always required to describe the type of
this, andthisis frequently accessed in generated code. Conventionally, the type variable is calledTHIS:class MyGenerator<THIS extends MyIf> { private final TRef<THIS> typeThis = refExtends(MyIf.class, generateDesc()); }- Type Parameters:
ST- the super typeT- the type variable used to refer to the extension- Parameters:
cls- the class of the super typedesc- the internal name of the actual generated extension type- Returns:
- the type
-
refExtends
- Type Parameters:
ST- the super typeT- the type variable used to refer to the extension- Parameters:
st- the super typedesc- the internal name of the actual generated extension type- Returns:
- the type
-
refExtends
Create a type describing a reflected extension of a given class (or interface) typeThis is used when the type is only known through reflection, but it is at least known to extend some other fixed type. This is best used with a type variable on the method that generates code wrt. the reflected class.
- Type Parameters:
ST- the super typeT- the type variable used to refer to the extension- Parameters:
st- the super typereflected- the reflected class- Returns:
- the type
-