- java.lang.Object
- 
- jdk.dynalink.linker.support.SimpleLinkRequest
 
- 
- All Implemented Interfaces:
- LinkRequest
 
 
 public class SimpleLinkRequest extends Object implements LinkRequest Default simple implementation ofLinkRequest.
- 
- 
Constructor SummaryConstructors Constructor Description SimpleLinkRequest(CallSiteDescriptor callSiteDescriptor, boolean callSiteUnstable, Object... arguments)Creates a new link request.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getArguments()Returns the arguments for the invocation being linked.CallSiteDescriptorgetCallSiteDescriptor()Returns the call site descriptor for the call site being linked.ObjectgetReceiver()Returns the first argument for the invocation being linked; this is typically the receiver object.booleanisCallSiteUnstable()Returns true if the call site is considered unstable, that is, it has been relinked more times than was specified inDynamicLinkerFactory.setUnstableRelinkThreshold(int).LinkRequestreplaceArguments(CallSiteDescriptor newCallSiteDescriptor, Object... newArguments)Returns a request identical to this one with call site descriptor and arguments replaced with the ones specified.
 
- 
- 
- 
Constructor Detail- 
SimpleLinkRequestpublic SimpleLinkRequest(CallSiteDescriptor callSiteDescriptor, boolean callSiteUnstable, Object... arguments) Creates a new link request.- Parameters:
- 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.
- Throws:
- NullPointerException- if either- callSiteDescriptoror- argumentsis null.
 
 
- 
 - 
Method Detail- 
getArgumentspublic Object[] getArguments() Description copied from interface:LinkRequestReturns 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.- Specified by:
- getArgumentsin interface- LinkRequest
- Returns:
- the arguments for the invocation being linked.
 
 - 
getReceiverpublic Object getReceiver() Description copied from interface:LinkRequestReturns the first argument for the invocation being linked; this is typically the receiver object. This is a shorthand forgetArguments()[0]that also avoids the cloning of the arguments array.- Specified by:
- getReceiverin interface- LinkRequest
- Returns:
- the receiver object.
 
 - 
getCallSiteDescriptorpublic CallSiteDescriptor getCallSiteDescriptor() Description copied from interface:LinkRequestReturns the call site descriptor for the call site being linked.- Specified by:
- getCallSiteDescriptorin interface- LinkRequest
- Returns:
- the call site descriptor for the call site being linked.
 
 - 
isCallSiteUnstablepublic boolean isCallSiteUnstable() Description copied from interface:LinkRequestReturns true if the call site is considered unstable, that is, it has been relinked more times than was specified inDynamicLinkerFactory.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.- Specified by:
- isCallSiteUnstablein interface- LinkRequest
- Returns:
- true if the call site is considered unstable.
 
 - 
replaceArgumentspublic LinkRequest replaceArguments(CallSiteDescriptor newCallSiteDescriptor, Object... newArguments) Description copied from interface:LinkRequestReturns a request identical to this one with call site descriptor and arguments replaced with the ones specified.- Specified by:
- replaceArgumentsin interface- LinkRequest
- Parameters:
- newCallSiteDescriptor- the new call site descriptor
- newArguments- the new arguments
- Returns:
- a new request identical to this one, except with the call site descriptor and arguments replaced with the specified ones.
 
 
- 
 
-