Class AbstractRelinkableCallSite
java.lang.Object
java.lang.invoke.CallSite
java.lang.invoke.MutableCallSite
jdk.dynalink.support.AbstractRelinkableCallSite
- All Implemented Interfaces:
- RelinkableCallSite
- Direct Known Subclasses:
- ChainedCallSite,- SimpleRelinkableCallSite
public abstract class AbstractRelinkableCallSite
extends MutableCallSite
implements RelinkableCallSite
A basic implementation of the 
RelinkableCallSite as a
 MutableCallSite. It carries a CallSiteDescriptor passed in
 the constructor and provides the correct implementation of the
 initialize(MethodHandle) method. Subclasses must provide
 RelinkableCallSite.relink(GuardedInvocation, MethodHandle) and
 RelinkableCallSite.resetAndRelink(GuardedInvocation, MethodHandle)
 methods.- Since:
- 9
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractRelinkableCallSite(CallSiteDescriptor descriptor) Creates a new abstract relinkable call site.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the descriptor for this call site.voidinitialize(MethodHandle relinkAndInvoke) Invoked by dynamic linker to initialize the relinkable call site by setting a relink-and-invoke method handle.Methods declared in class java.lang.invoke.MutableCallSitedynamicInvoker, getTarget, setTarget, syncAllMethods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface jdk.dynalink.RelinkableCallSiterelink, resetAndRelink
- 
Constructor Details- 
AbstractRelinkableCallSiteCreates a new abstract relinkable call site.- Parameters:
- descriptor- the descriptor for this call site that will be returned from- getDescriptor(). The call site's- CallSite.type()will be equal to descriptor's- CallSiteDescriptor.getMethodType().
- Throws:
- NullPointerException- if- descriptoris null.
 
 
- 
- 
Method Details- 
getDescriptorDescription copied from interface:RelinkableCallSiteReturns the descriptor for this call site.- Specified by:
- getDescriptorin interface- RelinkableCallSite
- Returns:
- the descriptor for this call site.
 
- 
initializeDescription copied from interface:RelinkableCallSiteInvoked by dynamic linker to initialize the relinkable call site by setting a relink-and-invoke method handle. The call site implementation is supposed to set this method handle as its target usingCallSite.setTarget(MethodHandle). Relink-and-invoke is the initial method handle set byDynamicLinker.link(RelinkableCallSite)that will cause the call site to be relinked to an appropriate target on its first invocation based on its arguments, and that linked target will then be invoked (hence the name). This linking protocol effectively delays linking until the call site is invoked with actual arguments and thus ensures that linkers can make nuanced linking decisions based on those arguments and not just on the static method type of the call site.- Specified by:
- initializein interface- RelinkableCallSite
- Parameters:
- relinkAndInvoke- a relink-and-invoke method handle supplied by Dynalink.
 
 
-