public class SimpleLinkRequest extends Object implements LinkRequest
LinkRequest
.Constructor and Description |
---|
SimpleLinkRequest(CallSiteDescriptor callSiteDescriptor,
boolean callSiteUnstable,
Object... arguments)
Creates a new link request.
|
Modifier and Type | Method and 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()
LinkRequest
getArguments
in interface LinkRequest
public Object getReceiver()
LinkRequest
getArguments()[0]
that also avoids the cloning of the arguments
array.getReceiver
in interface LinkRequest
public CallSiteDescriptor getCallSiteDescriptor()
LinkRequest
getCallSiteDescriptor
in interface LinkRequest
public boolean isCallSiteUnstable()
LinkRequest
DynamicLinkerFactory.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 LinkRequest
public LinkRequest replaceArguments(CallSiteDescriptor newCallSiteDescriptor, Object... newArguments)
LinkRequest
replaceArguments
in interface LinkRequest
newCallSiteDescriptor
- the new call site descriptornewArguments
- the new arguments
Copyright © 2015, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-02-27-130607.doko.src