RelinkableCallSiteChainedCallSite, SimpleRelinkableCallSitepublic abstract class AbstractRelinkableCallSite extends MutableCallSite implements RelinkableCallSite
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.| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractRelinkableCallSite(CallSiteDescriptor descriptor) |
Creates a new abstract relinkable call site.
|
| Modifier and Type | Method | Description |
|---|---|---|
CallSiteDescriptor |
getDescriptor() |
Returns the descriptor for this call site.
|
void |
initialize(MethodHandle relinkAndInvoke) |
Invoked by dynamic linker to initialize the relinkable call site by
setting a relink-and-invoke method handle.
|
dynamicInvoker, getTarget, setTarget, syncAllclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrelink, resetAndRelinkprotected AbstractRelinkableCallSite(CallSiteDescriptor descriptor)
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().NullPointerException - if descriptor is null.public CallSiteDescriptor getDescriptor()
RelinkableCallSitegetDescriptor in interface RelinkableCallSitepublic void initialize(MethodHandle relinkAndInvoke)
RelinkableCallSiteCallSite.setTarget(MethodHandle). Relink-and-invoke is the
initial method handle set by
DynamicLinker.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.initialize in interface RelinkableCallSiterelinkAndInvoke - a relink-and-invoke method handle supplied by
Dynalink. Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 2015, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Debian+0-9b153-2