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 linkRequest, final LinkerServices 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<?> clazz)
Implements abstract java. Computes the value to associate to the given |
| 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 value to associate to the given
This method is invoked when the initial read-only access by
If this method throws an exception, the initiating Otherwise, the value is computed and returned. An attempt to associate the return value happens, with one of the following outcomes:
| |