public interface JvmType extends Comparable<JvmType>
JKit provides classes and methods for representing and manipulating Java
types (such int, String[] etc). The majority
of these can be found here. For example, the Type.Int class is
used to represent int types, whilst
Type.Reference represents general reference types, such as
java.lang.String.
| Modifier and Type | Interface and Description |
|---|---|
static class |
JvmType.Array
The Array type captures array types! The elementType gives the types of
the elements held in the array.
|
static class |
JvmType.Bool
Represents the Java type "boolean"
|
static class |
JvmType.Byte
Represents the Java type "byte"
|
static class |
JvmType.Char
Represents the Java type "char"
|
static class |
JvmType.Clazz
This represents a reference to a class.
|
static class |
JvmType.Double
Represents the Java type "double"
|
static class |
JvmType.Float
Represents the Java type "float"
|
static class |
JvmType.Function
Represents the type of a method.
|
static class |
JvmType.Int
Represents the Java type "int"
|
static class |
JvmType.Intersection
An intersection type represents a (unknown) type which known to be a
subtype of several types.
|
static class |
JvmType.Long
Represents the Java type "long"
|
static class |
JvmType.Null
The Null type is a special type given to the null value.
|
static interface |
JvmType.Primitive
The Primitive type abstracts all the primitive types.
|
static interface |
JvmType.Reference
The Reference type abstracts all the reference types, including class
types, array types, variable and wildcard types.
|
static class |
JvmType.Short
Represents the Java type "short"
|
static class |
JvmType.Variable
Represents a Generic type variable.
|
static class |
JvmType.Void
The Void type is used to represent "void" types, found in method
declarations.
|
static class |
JvmType.Wildcard
This represents the special "?" type.
|
| Modifier and Type | Method and Description |
|---|---|
List<JvmType.Variable> |
usedVariables()
This method returns the list of generic variables used in this type.
|
compareToList<JvmType.Variable> usedVariables()
This method returns the list of generic variables used in this type. So, for example, suppose we have:
T = java.lang.ArrayList<? extends S>
Then, T.usedVariables()=[S].
Copyright © 2016. All rights reserved.