public class InvokedynamicBootstrap
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BOOTSTRAP_CLASS |
static java.lang.String |
CONSTRUCTOR_BOOTSTRAP |
static java.lang.String |
GET_INSTANCE_BOOTSTRAP_ATTRIBUTE |
static java.lang.String |
GET_STATIC_BOOTSTRAP_ATTRIBUTE |
static java.lang.String |
INSTANCE_BOOTSTRAP_METHOD |
private static java.lang.invoke.MethodHandle |
mh
Method handle that holds the member to be invoked.
|
static java.lang.invoke.MethodHandles.Lookup |
Mhlookup |
static java.lang.String |
SET_INSTANCE_BOOTSTRAP_ATTRIBUTE |
static java.lang.String |
SET_STATIC_BOOTSTRAP_ATTRIBUTE |
static java.lang.String |
STATIC_BOOTSTRAP_METHOD |
private static int |
TRUSTED
Field used to search for methods and fields without visibility constraints.
|
Constructor and Description |
---|
InvokedynamicBootstrap() |
Modifier and Type | Method and Description |
---|---|
static java.lang.invoke.CallSite |
constructorBootstrap(java.lang.invoke.MethodHandles.Lookup lookup,
java.lang.String name,
java.lang.invoke.MethodType type,
java.lang.Class<?> nameClass,
java.lang.String member)
Bootstrap used to generate CallSite for constructors.
|
static java.lang.invoke.CallSite |
getInstanceBootstrapAttribute(java.lang.invoke.MethodHandles.Lookup lookup,
java.lang.String name,
java.lang.invoke.MethodType type,
java.lang.Class<?> nameClass,
java.lang.String member)
Bootstrap used to generate CallSite for instance fields to get their value.
|
static java.lang.invoke.CallSite |
getStaticBootstrapAttribute(java.lang.invoke.MethodHandles.Lookup lookup,
java.lang.String name,
java.lang.invoke.MethodType type,
java.lang.Class<?> nameClass,
java.lang.String member)
Bootstrap used to generate CallSite for static fields to get their value.
|
static java.lang.invoke.CallSite |
instanceBootstrapMethod(java.lang.invoke.MethodHandles.Lookup lookup,
java.lang.String name,
java.lang.invoke.MethodType type,
java.lang.Class<?> nameClass,
java.lang.String member)
Bootstrap used to generate CallSite for instance methods, which can implement an interface or override an abstract method.
|
static java.lang.invoke.CallSite |
setInstanceBootstrapAttribute(java.lang.invoke.MethodHandles.Lookup lookup,
java.lang.String name,
java.lang.invoke.MethodType type,
java.lang.Class<?> nameClass,
java.lang.String member)
Bootstrap used to generate CallSite for instance fields to set their value.
|
static java.lang.invoke.CallSite |
setStaticBootstrapAttribute(java.lang.invoke.MethodHandles.Lookup lookup,
java.lang.String name,
java.lang.invoke.MethodType type,
java.lang.Class<?> nameClass,
java.lang.String member)
Bootstrap used to generate CallSite for static fields to set their value.
|
static java.lang.invoke.CallSite |
staticBootstrapMethod(java.lang.invoke.MethodHandles.Lookup lookup,
java.lang.String name,
java.lang.invoke.MethodType type,
java.lang.Class<?> nameClass,
java.lang.String member)
Bootstrap used to generate CallSite for static methods.
|
public static final java.lang.String BOOTSTRAP_CLASS
public static final java.lang.String CONSTRUCTOR_BOOTSTRAP
public static final java.lang.String STATIC_BOOTSTRAP_METHOD
public static final java.lang.String INSTANCE_BOOTSTRAP_METHOD
public static final java.lang.String GET_STATIC_BOOTSTRAP_ATTRIBUTE
public static final java.lang.String SET_STATIC_BOOTSTRAP_ATTRIBUTE
public static final java.lang.String GET_INSTANCE_BOOTSTRAP_ATTRIBUTE
public static final java.lang.String SET_INSTANCE_BOOTSTRAP_ATTRIBUTE
public static java.lang.invoke.MethodHandles.Lookup Mhlookup
private static java.lang.invoke.MethodHandle mh
private static int TRUSTED
public static java.lang.invoke.CallSite constructorBootstrap(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.String name, java.lang.invoke.MethodType type, java.lang.Class<?> nameClass, java.lang.String member) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException
lookup
- lookup. It only searches for public members in classes.name
- Name of the class that calls the Bootstrap.type
- Signature of the constructor to be invoked.nameClass
- Name of the class we want to create an instance of.member
- Name of the constructor. In this case it will be the empty string.java.lang.NoSuchMethodException
- There is no method with the specified signature.java.lang.IllegalAccessException
- If the class of the member to be invoked is not public.public static java.lang.invoke.CallSite staticBootstrapMethod(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.String name, java.lang.invoke.MethodType type, java.lang.Class<?> nameClass, java.lang.String member) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException
lookup
- lookup. It only searches for public members in classes.name
- Name of the class that calls the Bootstrap.type
- Signature of the method to be invoked.nameClass
- Name of the class that contains the method to be dynamically invoked.member
- Name of the method to be invoked.java.lang.NoSuchMethodException
- There is no method with the specified signature.java.lang.IllegalAccessException
- If the class of the member to be invoked is not public.public static java.lang.invoke.CallSite instanceBootstrapMethod(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.String name, java.lang.invoke.MethodType type, java.lang.Class<?> nameClass, java.lang.String member) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException
lookup
- Public lookup. It only searches for public members in classes.name
- Name of the class that calls the Bootstrap.type
- Signature of the method to be invoked.nameClass
- Name of the class that contains the method to be dynamically invoked.member
- Name of the method to be invoked.java.lang.NoSuchMethodException
- There is no method with the specified signature.java.lang.IllegalAccessException
- If the class of the member to be invoked is not public.public static java.lang.invoke.CallSite getStaticBootstrapAttribute(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.String name, java.lang.invoke.MethodType type, java.lang.Class<?> nameClass, java.lang.String member) throws java.lang.NoSuchFieldException, java.lang.IllegalAccessException
lookup
- Public lookup. It only searches for public members in classes.name
- Name of the class that calls the Bootstrap.type
- Signature of the field to be invoked.nameClass
- Name of the class that contains the field to be dynamically invoked.member
- Name of the field to be invoked.java.lang.NoSuchFieldException
- When a member with the specified signature does not exist.java.lang.IllegalAccessException
- If the class of the member to be invoked is not public.public static java.lang.invoke.CallSite setStaticBootstrapAttribute(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.String name, java.lang.invoke.MethodType type, java.lang.Class<?> nameClass, java.lang.String member) throws java.lang.NoSuchFieldException, java.lang.IllegalAccessException
lookup
- Public lookup. It only searches for public members in classes.name
- Name of the class that calls the Bootstrap.type
- Signature of the field to be invoked.nameClass
- Name of the class that contains the field to be dynamically invoked.member
- Name of the field to be invoked.java.lang.NoSuchFieldException
- When a member with the specified signature does not exist.java.lang.IllegalAccessException
- If the class of the member to be invoked is not public.public static java.lang.invoke.CallSite getInstanceBootstrapAttribute(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.String name, java.lang.invoke.MethodType type, java.lang.Class<?> nameClass, java.lang.String member) throws java.lang.NoSuchFieldException, java.lang.IllegalAccessException
lookup
- Public lookup. It only searches for public members in classes.name
- Name of the class that calls the Bootstraptype
- Signature of the field to be invoked.nameClass
- Name of the class that contains the field to be dynamically invokedmember
- Name of the field to be invoked.java.lang.NoSuchFieldException
- When a member with the specified signature does not exist.java.lang.IllegalAccessException
- If the class of the member to be invoked is not public.public static java.lang.invoke.CallSite setInstanceBootstrapAttribute(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.String name, java.lang.invoke.MethodType type, java.lang.Class<?> nameClass, java.lang.String member) throws java.lang.IllegalAccessException, java.lang.NoSuchFieldException
lookup
- Public lookup. It only searches for public members in classes.name
- Name of the class that calls the Bootstrap.type
- Signature of the field to be invoked.nameClass
- Name of the class that contains the field to be dynamically invoked.member
- Name of the field to be invoked.java.lang.NoSuchFieldException
- If the class of the member to be invoked is not public.java.lang.IllegalAccessException
- When a member with the specified signature does not exist.