LinkRequestpublic class SimpleLinkRequest extends Object implements LinkRequest
LinkRequest.| Constructor | Description |
|---|---|
SimpleLinkRequest(CallSiteDescriptor callSiteDescriptor,
boolean callSiteUnstable,
Object... arguments) |
Creates a new link request.
|
| Modifier and Type | Method | Description |
|---|---|---|
Object[] |
getArguments() |
Returns the arguments for the invocation being linked.
|
CallSiteDescriptor |
getCallSiteDescriptor() |
Returns the call site descriptor for the call site being linked.
|
Object |
getReceiver() |
Returns the first argument for the invocation being linked; this is
typically the receiver object.
|
boolean |
isCallSiteUnstable() |
Returns true if the call site is considered unstable, that is, it has been relinked more times than was
specified in
DynamicLinkerFactory.setUnstableRelinkThreshold(int). |
LinkRequest |
replaceArguments(CallSiteDescriptor newCallSiteDescriptor,
Object... newArguments) |
Returns a request identical to this one with call site descriptor and arguments replaced with the ones specified.
|
public SimpleLinkRequest(CallSiteDescriptor callSiteDescriptor, boolean callSiteUnstable, Object... arguments)
callSiteDescriptor - the descriptor for the call site being linked.
Must not be null.callSiteUnstable - true if the call site being linked is considered
unstable.arguments - the arguments for the invocation. Must not be null.NullPointerException - if either callSiteDescriptor or
arguments is null.public Object[] getArguments()
LinkRequestgetArguments in interface LinkRequestpublic Object getReceiver()
LinkRequestgetArguments()[0] that also avoids the cloning of the arguments
array.getReceiver in interface LinkRequestpublic CallSiteDescriptor getCallSiteDescriptor()
LinkRequestgetCallSiteDescriptor in interface LinkRequestpublic boolean isCallSiteUnstable()
LinkRequestDynamicLinkerFactory.setUnstableRelinkThreshold(int). Linkers should use this as a
hint to prefer producing linkage that is more stable (its guard fails less frequently), even if that assumption
causes a less effective version of an operation to be linked. This is just a hint, though, and linkers are
allowed to ignore this property.isCallSiteUnstable in interface LinkRequestpublic LinkRequest replaceArguments(CallSiteDescriptor newCallSiteDescriptor, Object... newArguments)
LinkRequestreplaceArguments in interface LinkRequestnewCallSiteDescriptor - the new call site descriptornewArguments - the new arguments 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