CallSiteDescriptor (Java SE 11 & JDK 11 ) (original) (raw)

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.

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.