APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.dynalink.linker.support

public Class CompositeGuardingDynamicLinker

extends Object
implements GuardingDynamicLinker
Class Inheritance
All Implemented Interfaces
jdk.dynalink.linker.GuardingDynamicLinker
Imports
java.util.LinkedList, .List, .Objects, jdk.dynalink.linker.GuardedInvocation, .GuardingDynamicLinker, .LinkRequest, .LinkerServices

A GuardingDynamicLinker that delegates sequentially to a list of other guarding dynamic linkers in its getGuardedInvocation(LinkRequest, LinkerServices).
Since
9

Field Summary

Modifier and TypeField and Description
private final GuardingDynamicLinker[]

Constructor Summary

AccessConstructor and Description
public
CompositeGuardingDynamicLinker(final Iterable<? extends GuardingDynamicLinker>
a list of component linkers.
linkers
)

Creates a new composite linker.

Method Summary

Modifier and TypeMethod and Description
public GuardedInvocation

Returns:

the first non-null return value from a component linker, or null if none of the components returned a non-null.
getGuardedInvocation
(final LinkRequest
the object describing the request for linking a particular invocation
linkRequest
,
final LinkerServices
linker services
linkerServices
)

Implements jdk.dynalink.linker.GuardingDynamicLinker.getGuardedInvocation.

Delegates the call to its component linkers.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

linkersback to summary
private final GuardingDynamicLinker[] linkers

Constructor Detail

CompositeGuardingDynamicLinkerback to summary
public CompositeGuardingDynamicLinker(final Iterable<? extends GuardingDynamicLinker> linkers)

Creates a new composite linker.

Parameters
linkers:Iterable<? extends GuardingDynamicLinker>

a list of component linkers.

Exceptions
NullPointerException:
if linkers or any of its elements are null.

Method Detail

getGuardedInvocationback to summary
public GuardedInvocation getGuardedInvocation(final LinkRequest linkRequest, final LinkerServices linkerServices) throws Exception

Implements jdk.dynalink.linker.GuardingDynamicLinker.getGuardedInvocation.

Delegates the call to its component linkers. The first non-null value returned from a component linker is returned. If no component linker returns a non-null invocation, null is returned.

Parameters
linkRequest:LinkRequest

the object describing the request for linking a particular invocation

linkerServices:LinkerServices

linker services

Returns:GuardedInvocation

the first non-null return value from a component linker, or null if none of the components returned a non-null.

Annotations
@Override
Exceptions
Exception:

Doc from jdk.dynalink.linker.GuardingDynamicLinker.getGuardedInvocation.

if the operation fails for whatever reason