Package net.bytebuddy.utility
Enum JavaType
- java.lang.Object
-
- java.lang.Enum<JavaType>
-
- net.bytebuddy.utility.JavaType
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CALL_SITEThe Java 7java.lang.invoke.CallSitetype.EXECUTABLEThejava.lang.reflect.Executabletype.METHOD_HANDLEThe Java 7java.lang.invoke.MethodHandletype.METHOD_HANDLES_LOOKUPThe Java 7java.lang.invoke.MethodTypes.Lookuptype.METHOD_TYPEThe Java 7java.lang.invoke.MethodTypetype.MODULEThejava.lang.Moduletype.PARAMETERThe Java 8java.lang.reflect.Parametertype.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeDescriptiongetTypeStub()Returns at least a stub representing this type where the stub does not define any methods or fields.java.lang.Class<?>load()Loads the class that is represented by this Java type.static JavaTypevalueOf(java.lang.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.
-
-
-
Enum Constant Detail
-
METHOD_HANDLE
public static final JavaType METHOD_HANDLE
The Java 7java.lang.invoke.MethodHandletype.
-
METHOD_TYPE
public static final JavaType METHOD_TYPE
The Java 7java.lang.invoke.MethodTypetype.
-
METHOD_HANDLES_LOOKUP
public static final JavaType METHOD_HANDLES_LOOKUP
The Java 7java.lang.invoke.MethodTypes.Lookuptype.
-
CALL_SITE
public static final JavaType CALL_SITE
The Java 7java.lang.invoke.CallSitetype.
-
PARAMETER
public static final JavaType PARAMETER
The Java 8java.lang.reflect.Parametertype.
-
EXECUTABLE
public static final JavaType EXECUTABLE
Thejava.lang.reflect.Executabletype.
-
MODULE
public static final JavaType MODULE
Thejava.lang.Moduletype.
-
-
Method Detail
-
values
public static JavaType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JavaType c : JavaType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JavaType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getTypeStub
public TypeDescription getTypeStub()
Returns at least a stub representing this type where the stub does not define any methods or fields. If a type exists for the current runtime, a loaded type representation is returned.- Returns:
- A type description for this Java type.
-
load
public java.lang.Class<?> load() throws java.lang.ClassNotFoundExceptionLoads the class that is represented by this Java type.- Returns:
- A loaded type of this Java type.
- Throws:
java.lang.ClassNotFoundException- If the represented type cannot be loaded.
-
-