The bootstrap methods in this class will throw a
NullPointerException
for any reference argument that is null
,
unless the argument is specified to be unused or specified to accept a
null
value.
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public static VarHandle | Returns: theVarHandle the lookup context describing the class performing the
operation (normally stacked by the JVM) lookup,unused name, Class<VarHandle> the required result type (must be type, Class<?> Class<VarHandle> )the type of the array arrayClass)Finds a |
public static < The enum type for which a constant value is to be returned E extends Enum | Returns: the enum constant of the specified enum type with the specified namethe lookup context describing the class performing the
operation (normally stacked by the JVM) lookup,the name of the constant to return, which must exactly match
an enum constant in the specified type. name, Class<E> the type)Class object describing the enum type for which
a constant is to be returnedReturns an |
public static Object | Returns: the converted valueunused lookup,unused name, Class<?> the destination type of the conversion dstType, Object the value to be converted value)Applies a conversion from a source type to a destination type. |
public static VarHandle | Returns: theVarHandle the lookup context describing the class performing the
operation (normally stacked by the JVM) lookup,the name of the field name, Class<VarHandle> the required result type (must be type, Class<?> Class<VarHandle> )the class in which the field is declared declaringClass, Class<?> the type of the field fieldType)Finds a |
public static Object | Returns: the value of the fieldthe lookup context describing the class performing the
operation (normally stacked by the JVM) lookup,the name of the field name, Class<?> the type of the field type, Class<?> the class in which the field is declared declaringClass)Returns the value of a static final field. |
public static Object | Returns: the value of the fieldthe lookup context describing the class performing the
operation (normally stacked by the JVM) lookup,the name of the field name, Class<?> the type of the field type)Returns the value of a static final field declared in the class which
is the same as the field's type (or, for primitive-valued fields,
declared in the wrapper class.) This is a simplified form of
|
public static Object | Returns: the result of invoking the method handleunused lookup,unused name, Class<?> the desired type of the value to be returned, which must be
compatible with the return type of the method handle type, MethodHandle the method handle to be invoked handle, Object... the arguments to pass to the method handle, as if with
args)MethodHandle#invokeWithArguments . Each argument may be
null .Returns the result of invoking a method handle with the provided arguments. |
pack-priv static Object | makeConstant(MethodHandle bootstrapMethod, String name, Class<?> type, Object info, Class<?> callerClass)
|
public static Object | Returns: anull valueunused lookup,unused name, Class<?> a reference type type)Returns a |
public static Class | Returns: theClass mirrorunused lookup,the descriptor (JVMS 4.3) of the desired primitive type name, Class<?> the required result type (must be type)Class.class )Returns a |
public static VarHandle | Returns: theVarHandle the lookup context describing the class performing the
operation (normally stacked by the JVM) lookup,the name of the field name, Class<VarHandle> the required result type (must be type, Class<?> Class<VarHandle> )the class in which the field is declared declaringClass, Class<?> the type of the field fieldType)Finds a |
private static <T> Class |
ConstantBootstraps | back to summary |
---|---|
private ConstantBootstraps() Do not call. |
arrayVarHandle | back to summary |
---|---|
public static VarHandle arrayVarHandle(MethodHandles. Finds a
|
enumConstant | back to summary |
---|---|
public static <E extends Enum Returns an
|
explicitCast | back to summary |
---|---|
public static Object explicitCast(MethodHandles. Applies a conversion from a source type to a destination type.
Given a destination type
Otherwise one of the following conversions is applied to
The result is the same as when using the following code:
|
fieldVarHandle | back to summary |
---|---|
public static VarHandle fieldVarHandle(MethodHandles. Finds a
|
getStaticFinal | back to summary |
---|---|
public static Object getStaticFinal(MethodHandles. Returns the value of a static final field.
|
getStaticFinal | back to summary |
---|---|
public static Object getStaticFinal(MethodHandles. Returns the value of a static final field declared in the class which
is the same as the field's type (or, for primitive-valued fields,
declared in the wrapper class.) This is a simplified form of
|
invoke | back to summary |
---|---|
public static Object invoke(MethodHandles. Returns the result of invoking a method handle with the provided arguments.
This method behaves as if the method handle to be invoked is the result
of adapting the given method handle, via
|
makeConstant | back to summary |
---|---|
pack-priv static Object makeConstant(MethodHandle bootstrapMethod, String name, Class<?> type, Object info, Class<?> callerClass) |
nullConstant | back to summary |
---|---|
public static Object nullConstant(MethodHandles. Returns a
|
primitiveClass | back to summary |
---|---|
public static Class Returns a
|
staticFieldVarHandle | back to summary |
---|---|
public static VarHandle staticFieldVarHandle(MethodHandles. Finds a
|
validateClassAccess | back to summary |
---|---|
private static <T> Class |