Top Description Methods
jdk.dynalink.linker

public Interface LinkRequest

Known Direct Implementers
jdk.dynalink.linker.support.SimpleLinkRequest
Imports
jdk.dynalink.CallSiteDescriptor, .DynamicLinker, .DynamicLinkerFactory

Represents a request to link a particular invocation at a particular call site. Instances of these requests will be constructed and passed to all GuardingDynamicLinker objects managed by the DynamicLinker that is trying to link the call site.
Since
9

Method Summary

Modifier and TypeMethod and Description
public Object[]

Returns:

the arguments for the invocation being linked.
getArguments
()

Returns the arguments for the invocation being linked.

public CallSiteDescriptor

Returns:

the call site descriptor for the call site being linked.
getCallSiteDescriptor
()

Returns the call site descriptor for the call site being linked.

public Object

Returns:

the receiver object.
getReceiver
()

Returns the first argument for the invocation being linked; this is typically the receiver object.

public boolean

Returns:

true if the call site is considered unstable.
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).

public LinkRequest

Returns:

a new request identical to this one, except with the call site descriptor and arguments replaced with the specified ones.
replaceArguments
(CallSiteDescriptor
the new call site descriptor
callSiteDescriptor
,
Object...
the new arguments
arguments
)

Returns a request identical to this one with call site descriptor and arguments replaced with the ones specified.

Method Detail

getArgumentsback to summary
public Object[] getArguments()

Returns the arguments for the invocation being linked. The returned array must be a clone; modifications to it must not affect the arguments in this request.

Returns:Object[]

the arguments for the invocation being linked.

getCallSiteDescriptorback to summary
public CallSiteDescriptor getCallSiteDescriptor()

Returns the call site descriptor for the call site being linked.

Returns:CallSiteDescriptor

the call site descriptor for the call site being linked.

getReceiverback to summary
public Object getReceiver()

Returns the first argument for the invocation being linked; this is typically the receiver object. This is a shorthand for getArguments()[0] that also avoids the cloning of the arguments array.

Returns:Object

the receiver object.

isCallSiteUnstableback to summary
public 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). 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.

Returns:boolean

true if the call site is considered unstable.

replaceArgumentsback to summary
public LinkRequest replaceArguments(CallSiteDescriptor callSiteDescriptor, Object... arguments)

Returns a request identical to this one with call site descriptor and arguments replaced with the ones specified.

Parameters
callSiteDescriptor:CallSiteDescriptor

the new call site descriptor

arguments:Object[]

the new arguments

Returns:LinkRequest

a new request identical to this one, except with the call site descriptor and arguments replaced with the specified ones.