LinkRequest (Java SE 11 & JDK 11 ) (original) (raw)
- All Known Implementing Classes:
[SimpleLinkRequest](support/SimpleLinkRequest.html "class in jdk.dynalink.linker.support")
public interface LinkRequest
Represents a request to link a particular invocation at a particular call site. Instances of these requests will be constructed and passed to allGuardingDynamicLinker objects managed by the DynamicLinker that is trying to link the call site.
Method Summary
All Methods Instance Methods Abstract Methods
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 callSiteDescriptor,Object... arguments) Returns a request identical to this one with call site descriptor and arguments replaced with the ones specified. Method Detail
* #### getCallSiteDescriptor [CallSiteDescriptor](../CallSiteDescriptor.html "class in jdk.dynalink") getCallSiteDescriptor() Returns the call site descriptor for the call site being linked. Returns: the call site descriptor for the call site being linked. * #### getArguments [Object](../../../../java.base/java/lang/Object.html "class in java.lang")[] 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: the arguments for the invocation being linked. * #### getReceiver [Object](../../../../java.base/java/lang/Object.html "class in java.lang") 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: the receiver object. * #### isCallSiteUnstable 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)](../DynamicLinkerFactory.html#setUnstableRelinkThreshold%28int%29). 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: true if the call site is considered unstable. * #### replaceArguments [LinkRequest](LinkRequest.html "interface in jdk.dynalink.linker") replaceArguments([CallSiteDescriptor](../CallSiteDescriptor.html "class in jdk.dynalink") callSiteDescriptor, [Object](../../../../java.base/java/lang/Object.html "class in java.lang")... arguments) Returns a request identical to this one with call site descriptor and arguments replaced with the ones specified. Parameters: `callSiteDescriptor` \- the new call site descriptor `arguments` \- the new arguments Returns: a new request identical to this one, except with the call site descriptor and arguments replaced with the specified ones.
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.