public enum JavaType extends Enum<JavaType>
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
JavaType.TypeLookup
A handler for querying type information.
|
| Enum Constant and Description |
|---|
CALL_SITE
The Java 7
java.lang.invoke.CallSite type. |
METHOD_HANDLE
The Java 7
java.lang.invoke.MethodHandle type. |
METHOD_TYPE
The Java 7
java.lang.invoke.MethodType type. |
METHOD_TYPES_LOOKUP
The Java 7
java.lang.invoke.MethodTypes.Lookup type. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAssignableFrom(TypeDescription typeDescription)
Checks if a type is assignable from this type.
|
boolean |
isAssignableTo(TypeDescription typeDescription)
Checks if a type is assignable to this type.
|
protected abstract boolean |
isSubTypeOf(TypeDescription typeDescription)
Checks if a given type is a subtype of the given type.
|
Class<?> |
load()
Loads the provided type if this is possible or throws an exception if not.
|
boolean |
representedBy(TypeDescription typeDescription)
Checks if this type represents the provided type.
|
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 METHOD_HANDLE
java.lang.invoke.MethodHandle type.public static final JavaType METHOD_TYPE
java.lang.invoke.MethodType type.public static final JavaType METHOD_TYPES_LOOKUP
java.lang.invoke.MethodTypes.Lookup type.public static final JavaType CALL_SITE
java.lang.invoke.CallSite type.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 boolean isAssignableFrom(TypeDescription typeDescription)
typeDescription - The type that is to be checked.true if this type is assignable from the provided type.public boolean isAssignableTo(TypeDescription typeDescription)
typeDescription - The type that is to be checked.true if this type is assignable to the provided type.protected abstract boolean isSubTypeOf(TypeDescription typeDescription)
typeDescription - The type that is to be checked.true if this type is a subtype of the provided type.public boolean representedBy(TypeDescription typeDescription)
typeDescription - The type that is to be checked.true if this type represents the provided type.public Class<?> load()
Copyright © 2014–2015. All rights reserved.