TypeBasedGuardingDynamicLinker#canLinkType(Class)
method. The linkers
returning true are then bound to the class, and next time a receiver of same
type is encountered, the linking is delegated to those linkers only, speeding
up dispatch.
Modifier and Type | Class and Description |
---|---|
private static class |
Modifier and Type | Field and Description |
---|---|
private final ClassValue |
Access | Constructor and Description |
---|---|
public | CompositeTypeBasedGuardingDynamicLinker(final Iterable<? extends TypeBasedGuardingDynamicLinker>
the component linkers linkers)Creates a new composite type-based linker. |
Modifier and Type | Method and Description |
---|---|
private static void | addTypeBased(final List<GuardingDynamicLinker> llinkers, final List<TypeBasedGuardingDynamicLinker> tblinkers)
|
public boolean | Returns: true true if at least one of the composite linkers returns true fromTypeBasedGuardingDynamicLinker#canLinkType(Class) , false
otherwise.the type to link type)Implements jdk. Returns true if at least one of the composite linkers returns true from
|
public GuardedInvocation | getGuardedInvocation(final LinkRequest
the object describing the request for linking a
particular invocation linkRequest, final LinkerServices linker services linkerServices)Implements jdk. Creates a guarded invocation appropriate for a particular invocation with the specified arguments at a call site. |
public static List | Returns: the optimized listthe list of linkers to optimize linkers)Optimizes a list of type-based linkers. |
classToLinker | back to summary |
---|---|
private final ClassValue<List<TypeBasedGuardingDynamicLinker>> classToLinker |
CompositeTypeBasedGuardingDynamicLinker | back to summary |
---|---|
public CompositeTypeBasedGuardingDynamicLinker(final Iterable<? extends TypeBasedGuardingDynamicLinker> linkers) Creates a new composite type-based linker.
|
addTypeBased | back to summary |
---|---|
private static void addTypeBased(final List<GuardingDynamicLinker> llinkers, final List<TypeBasedGuardingDynamicLinker> tblinkers) |
canLinkType | back to summary |
---|---|
public boolean canLinkType(final Class<?> type) Implements jdk. Returns true if at least one of the composite linkers returns true from
|
getGuardedInvocation | back to summary |
---|---|
public GuardedInvocation getGuardedInvocation(final LinkRequest linkRequest, final LinkerServices linkerServices) throws Exception Implements jdk. Doc from jdk. Creates a guarded invocation appropriate for a particular invocation with the specified arguments at a call site.
|
optimize | back to summary |
---|---|
public static List Optimizes a list of type-based linkers. If a group of adjacent linkers in
the list all implement
|
Modifier and Type | Field and Description |
---|---|
private final TypeBasedGuardingDynamicLinker[] | |
private static final List | |
private final List |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
protected List | computeValue(final Class<?>
the type whose class value must be computed clazz)Implements abstract java. Computes the given class's derived value for this |
linkers | back to summary |
---|---|
private final TypeBasedGuardingDynamicLinker[] linkers |
NO_LINKER | back to summary |
---|---|
private static final List<TypeBasedGuardingDynamicLinker> NO_LINKER |
singletonLinkers | back to summary |
---|---|
private final List<TypeBasedGuardingDynamicLinker>[] singletonLinkers |
ClassToLinker | back to summary |
---|---|
pack-priv ClassToLinker(final TypeBasedGuardingDynamicLinker[] linkers)
|
computeValue | back to summary |
---|---|
protected List Implements abstract java. Doc from java. Computes the given class's derived value for this
This method will be invoked within the first thread that accesses
the value with the
Normally, this method is invoked at most once per class,
but it may be invoked again if there has been a call to
If this method throws an exception, the corresponding call to
|