public enum JavaType extends Enum<JavaType>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
JavaType.LatentTypeWithSimpleName
A latent type that resolves the simple name without considering the declaring type which is not normally available.
|
| Enum Constant and Description |
|---|
ACCESS_CONTROL_CONTEXT
The
java.security.AccessControlContext type which is deprecated for removal beginning in Java 17. |
CALL_SITE
The Java 7
java.lang.invoke.CallSite type. |
CLASS_DESCRIPTION
The Java 12
java.lang.constant.ClassDesc type. |
CONSTABLE
The Java 12
java.lang.constant.Constable type. |
CONSTANT_BOOTSTRAPS
The Java 12
java.lang.invoke.ConstantBootstraps type. |
CONSTANT_DESCRIPTION
The Java 12
java.lang.constant.ConstableDesc type. |
DIRECT_METHOD_HANDLE_DESCRIPTION
The Java 12
java.lang.constant.DirectMethodHandleDesc type. |
DYNAMIC_CONSTANT_DESCRIPTION
The Java 12
java.lang.constant.DynamicConstantDesc type. |
EXECUTABLE
The Java 7
java.lang.reflect.Executable type. |
METHOD_HANDLE
The Java 7
java.lang.invoke.MethodHandle type. |
METHOD_HANDLE_DESCRIPTION
The Java 12
java.lang.constant.MethodHandleDesc type. |
METHOD_HANDLES
The Java 7
java.lang.invoke.MethodHandles type. |
METHOD_HANDLES_LOOKUP
The Java 7
java.lang.invoke.MethodTypes.Lookup type. |
METHOD_TYPE
The Java 7
java.lang.invoke.MethodType type. |
METHOD_TYPE_DESCRIPTION
The Java 12
java.lang.constant.MethodTypeDesc type. |
MODULE
The Java 9
java.lang.Module type. |
OBJECT_METHODS
The Java 14
java.lang.runtime.ObjectMethods type. |
PARAMETER
The Java 8
java.lang.reflect.Parameter type. |
RECORD
The Java 14
java.lang.Record type. |
TYPE_DESCRIPTOR
The Java 12
java.lang.invoke.TypeDescriptor type. |
TYPE_DESCRIPTOR_OF_FIELD
The Java 12
java.lang.invoke.TypeDescriptor$OfMethod type. |
TYPE_DESCRIPTOR_OF_METHOD
The Java 12
java.lang.invoke.TypeDescriptor$OfMethod type. |
VAR_HANDLE
The Java 9
java.lang.invoke.VarHandle type. |
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
getTypeStub()
Returns at least a stub representing this type where the stub does not define any methods or fields.
|
boolean |
isAvailable()
Returns
true if this type is available on the current JVM. |
boolean |
isInstance(Object instance)
Checks if the supplied object is an instance of this type.
|
Class<?> |
load()
Loads the class that is represented by this Java type.
|
TypeDescription |
loadAsDescription()
Loads the class that is represented by this Java type and represents it as a
TypeDescription. |
static JavaType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JavaType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JavaType CONSTABLE
java.lang.constant.Constable type.public static final JavaType TYPE_DESCRIPTOR
java.lang.invoke.TypeDescriptor type.public static final JavaType TYPE_DESCRIPTOR_OF_FIELD
java.lang.invoke.TypeDescriptor$OfMethod type.public static final JavaType TYPE_DESCRIPTOR_OF_METHOD
java.lang.invoke.TypeDescriptor$OfMethod type.public static final JavaType CONSTANT_DESCRIPTION
java.lang.constant.ConstableDesc type.public static final JavaType DYNAMIC_CONSTANT_DESCRIPTION
java.lang.constant.DynamicConstantDesc type.public static final JavaType CLASS_DESCRIPTION
java.lang.constant.ClassDesc type.public static final JavaType METHOD_TYPE_DESCRIPTION
java.lang.constant.MethodTypeDesc type.public static final JavaType METHOD_HANDLE_DESCRIPTION
java.lang.constant.MethodHandleDesc type.public static final JavaType DIRECT_METHOD_HANDLE_DESCRIPTION
java.lang.constant.DirectMethodHandleDesc type.public static final JavaType METHOD_HANDLE
java.lang.invoke.MethodHandle type.public static final JavaType METHOD_HANDLES
java.lang.invoke.MethodHandles type.public static final JavaType METHOD_TYPE
java.lang.invoke.MethodType type.public static final JavaType METHOD_HANDLES_LOOKUP
java.lang.invoke.MethodTypes.Lookup type.public static final JavaType CALL_SITE
java.lang.invoke.CallSite type.public static final JavaType VAR_HANDLE
java.lang.invoke.VarHandle type.public static final JavaType PARAMETER
java.lang.reflect.Parameter type.public static final JavaType EXECUTABLE
java.lang.reflect.Executable type.public static final JavaType MODULE
java.lang.Module type.public static final JavaType CONSTANT_BOOTSTRAPS
java.lang.invoke.ConstantBootstraps type.public static final JavaType RECORD
java.lang.Record type.public static final JavaType OBJECT_METHODS
java.lang.runtime.ObjectMethods type.public static final JavaType ACCESS_CONTROL_CONTEXT
java.security.AccessControlContext type which is deprecated for removal beginning in Java 17.public static JavaType[] values()
for (JavaType c : JavaType.values()) System.out.println(c);
public static JavaType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic TypeDescription getTypeStub()
@CachedReturnPlugin.Enhance(value="loaded") public Class<?> load() throws ClassNotFoundException
ClassNotFoundException - If the represented type cannot be loaded.public TypeDescription loadAsDescription() throws ClassNotFoundException
TypeDescription.ClassNotFoundException - If the represented type cannot be loaded.@CachedReturnPlugin.Enhance(value="available") public boolean isAvailable()
true if this type is available on the current JVM.true if this type is available on the current JVM.public boolean isInstance(Object instance)
instance - The instance to check.true if the supplied object is an instance of this type.Copyright © 2014–2021. All rights reserved.