Module jdk.dynalink
Package jdk.dynalink

Class CallSiteDescriptor

java.lang.Object
jdk.dynalink.SecureLookupSupplier
jdk.dynalink.CallSiteDescriptor

public class CallSiteDescriptor extends SecureLookupSupplier
Call site descriptors contain all the information necessary for linking a call site. This information is normally passed as parameters to bootstrap methods and consists of the MethodHandles.Lookup object on the caller class in which the call site occurs, the dynamic operation at the call site, and the method type of the call site. CallSiteDescriptor objects are used in Dynalink to capture and store these parameters for subsequent use by the DynamicLinker.

The constructors of built-in RelinkableCallSite implementations all take a call site descriptor.

Call site descriptors must be immutable. You can use this class as-is or you can subclass it, especially if you need to add further information to the descriptors (typically, values passed in additional parameters to the bootstrap method. Since the descriptors must be immutable, you can set up a cache for equivalent descriptors to have the call sites share them.

The class extends SecureLookupSupplier for security-checked access to the MethodHandles.Lookup object it carries. This lookup should be used to find method handles to set as targets of the call site described by this descriptor.

Since:
9