| Constructor and Description |
|---|
ConstantCallSite(MethodHandle target)
Creates a call site with a permanent target.
|
| Modifier and Type | Method and Description |
|---|---|
MethodHandle |
dynamicInvoker()
Returns this call site's permanent target.
|
MethodHandle |
getTarget()
Returns the target method of the call site, which behaves
like a
final field of the ConstantCallSite. |
void |
setTarget(MethodHandle ignore)
Always throws an
UnsupportedOperationException. |
public ConstantCallSite(MethodHandle target)
target - the target to be permanently associated with this call siteNullPointerException - if the proposed target is nullpublic final MethodHandle getTarget()
final field of the ConstantCallSite.
That is, the the target is always the original value passed
to the constructor call which created this instance.getTarget in class CallSiteUnsupportedOperationException - because this kind of call site cannot change its targetConstantCallSite,
VolatileCallSite,
CallSite.setTarget(java.lang.invoke.MethodHandle),
getTarget(),
MutableCallSite.getTarget(),
VolatileCallSite.getTarget()public final void setTarget(MethodHandle ignore)
UnsupportedOperationException.
This kind of call site cannot change its target.setTarget in class CallSiteignore - a new target proposed for the call site, which is ignoredUnsupportedOperationException - because this kind of call site cannot change its targetCallSite.getTarget(),
setTarget(java.lang.invoke.MethodHandle),
MutableCallSite.setTarget(java.lang.invoke.MethodHandle),
VolatileCallSite.setTarget(java.lang.invoke.MethodHandle)public final MethodHandle dynamicInvoker()
CallSite.dynamicInvoker.dynamicInvoker in class CallSite Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.
DRAFT ea-b138