Top Description Inners Fields Constructors Methods
jdk.dynalink.beans

pack-priv Class BeanLinker

extends AbstractJavaLinker
implements TypeBasedGuardingDynamicLinker
Class Inheritance
All Implemented Interfaces
jdk.dynalink.linker.TypeBasedGuardingDynamicLinker, jdk.dynalink.linker.GuardingDynamicLinker
Known Direct Subclasses
jdk.dynalink.beans.ClassLinker
Imports
java.lang.invoke.MethodHandle, .MethodHandles, .MethodType, java.lang.reflect.Array, java.util.Collection, .Collections, .List, .Map, java.util.function.Function, jdk.dynalink.CallSiteDescriptor, .Namespace, .Operation, .StandardNamespace, .StandardOperation, jdk.dynalink.beans.GuardedInvocationComponent.ValidationType, jdk.dynalink.linker.GuardedInvocation, .LinkerServices, .TypeBasedGuardingDynamicLinker, jdk.dynalink.linker.support.Guards, .Lookup, .TypeUtilities

A class that provides linking capabilities for a single POJO class. Normally not used directly, but managed by BeansLinker. Most of the functionality is provided by the AbstractJavaLinker superclass; this class adds length and element operations for arrays and collections.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
BeanLinker.Binder

Contains methods to adapt an item getter/setter method handle to the requested type, optionally binding it to a fixed key first.

private static enum
private static class

Field Summary

Modifier and TypeField and Description
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final Object
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
private static final MethodHandle
Inherited from jdk.dynalink.beans.AbstractJavaLinker:
clazz

Constructor Summary

AccessConstructor and Description
pack-priv
BeanLinker(final Class<?> clazz)

Method Summary

Modifier and TypeMethod and Description
private static void
public boolean
canLinkType(final Class<?>
the type to link
type
)

Implements jdk.dynalink.linker.TypeBasedGuardingDynamicLinker.canLinkType.

Returns true if the linker can link an invocation where the first argument (receiver) is of the specified type.

private static Integer
convertKeyToInteger(final Object fixedKey, final LinkerServices linkerServices)

pack-priv FacetIntrospector
private static GuardedInvocationComponent
createGuardedInvocationComponentAsType(final MethodHandle invocation, final MethodType fromType, final LinkerServices linkerServices)

private static GuardedInvocationComponent
private static GuardedInvocationComponent
createInternalFilteredGuardedInvocationComponent(final MethodHandle invocation, final MethodHandle guard, final Class<?> validatorClass, final GuardedInvocationComponent.ValidationType validationType, final LinkerServices linkerServices)

private static MethodHandle
dropObjectArguments(final MethodHandle m, final int n)

private static MethodHandle
findRangeCheck(final Class<?> collectionType)

pack-priv SingleDynamicMethod
private GuardedInvocationComponent
private GuardedInvocationComponent
private GuardedInvocationComponent
protected GuardedInvocationComponent
private static Object
getTypedName(final Object name, final boolean isMap, final LinkerServices linkerServices)

private static GuardedInvocationComponent
private BeanLinker.GuardedInvocationComponentAndCollectionType
guardedInvocationComponentAndCollectionType(final MethodType callSiteType, final LinkerServices linkerServices, final Function<Class<?>, MethodHandle> arrayMethod, final MethodHandle listMethod, final MethodHandle mapMethod)

private static void
noOp()

private static boolean
rangeCheck(final Object array, final Object index)

private static boolean
rangeCheck(final List<?> list, final Object index)

Inherited from jdk.dynalink.beans.AbstractJavaLinker:
createDynamicMethodgetClassGuardgetClassGuardedInvocationComponentgetDynamicMethodgetGuardedInvocationgetMethodNamesgetNextComponentgetReadablePropertyNamesgetWritablePropertyNamesmatchReturnTypessetPropertyGetter

Field Detail

CONTAINS_MAPback to summary
private static final MethodHandle CONTAINS_MAP
GET_ARRAY_LENGTHback to summary
private static final MethodHandle GET_ARRAY_LENGTH
GET_COLLECTION_LENGTHback to summary
private static final MethodHandle GET_COLLECTION_LENGTH
GET_LIST_ELEMENTback to summary
private static final MethodHandle GET_LIST_ELEMENT
GET_MAP_ELEMENTback to summary
private static final MethodHandle GET_MAP_ELEMENT
GET_MAP_LENGTHback to summary
private static final MethodHandle GET_MAP_LENGTH
INVALID_NAMEback to summary
private static final Object INVALID_NAME
LIST_GUARDback to summary
private static final MethodHandle LIST_GUARD
MAP_GUARDback to summary
private static final MethodHandle MAP_GUARD
NO_OP_1back to summary
private static final MethodHandle NO_OP_1
NO_OP_2back to summary
private static final MethodHandle NO_OP_2
NO_OP_3back to summary
private static final MethodHandle NO_OP_3
NULL_GETTER_1back to summary
private static final MethodHandle NULL_GETTER_1
NULL_GETTER_2back to summary
private static final MethodHandle NULL_GETTER_2
PUT_MAP_ELEMENTback to summary
private static final MethodHandle PUT_MAP_ELEMENT
RANGE_CHECK_ARRAYback to summary
private static final MethodHandle RANGE_CHECK_ARRAY
RANGE_CHECK_LISTback to summary
private static final MethodHandle RANGE_CHECK_LIST
REMOVE_LIST_ELEMENTback to summary
private static final MethodHandle REMOVE_LIST_ELEMENT
REMOVE_MAP_ELEMENTback to summary
private static final MethodHandle REMOVE_MAP_ELEMENT
SET_LIST_ELEMENTback to summary
private static final MethodHandle SET_LIST_ELEMENT

Constructor Detail

BeanLinkerback to summary
pack-priv BeanLinker(final Class<?> clazz)

Method Detail

assertParameterCountback to summary
private static void assertParameterCount(final CallSiteDescriptor descriptor, final int paramCount)

Hides jdk.dynalink.beans.AbstractJavaLinker.assertParameterCount.

canLinkTypeback to summary
public boolean canLinkType(final Class<?> type)

Implements jdk.dynalink.linker.TypeBasedGuardingDynamicLinker.canLinkType.

Doc from jdk.dynalink.linker.TypeBasedGuardingDynamicLinker.canLinkType.

Returns true if the linker can link an invocation where the first argument (receiver) is of the specified type.

Parameters
type:Class<?>

the type to link

Returns:boolean

true if the linker can link calls for the receiver type, or false otherwise.

Annotations
@Override
convertKeyToIntegerback to summary
private static Integer convertKeyToInteger(final Object fixedKey, final LinkerServices linkerServices) throws Exception
createFacetIntrospectorback to summary
pack-priv FacetIntrospector createFacetIntrospector()

Implements abstract jdk.dynalink.beans.AbstractJavaLinker.createFacetIntrospector.

Annotations
@Override
createGuardedInvocationComponentAsTypeback to summary
private static GuardedInvocationComponent createGuardedInvocationComponentAsType(final MethodHandle invocation, final MethodType fromType, final LinkerServices linkerServices)
createInternalFilteredGuardedInvocationComponentback to summary
private static GuardedInvocationComponent createInternalFilteredGuardedInvocationComponent(final MethodHandle invocation, final LinkerServices linkerServices)
createInternalFilteredGuardedInvocationComponentback to summary
private static GuardedInvocationComponent createInternalFilteredGuardedInvocationComponent(final MethodHandle invocation, final MethodHandle guard, final Class<?> validatorClass, final GuardedInvocationComponent.ValidationType validationType, final LinkerServices linkerServices)
dropObjectArgumentsback to summary
private static MethodHandle dropObjectArguments(final MethodHandle m, final int n)
findRangeCheckback to summary
private static MethodHandle findRangeCheck(final Class<?> collectionType)
getConstructorMethodback to summary
pack-priv SingleDynamicMethod getConstructorMethod(final String signature)

Implements abstract jdk.dynalink.beans.AbstractJavaLinker.getConstructorMethod.

Annotations
@Override
getElementGetterback to summary
private GuardedInvocationComponent getElementGetter(final AbstractJavaLinker.ComponentLinkRequest req) throws Exception
getElementRemoverback to summary
private GuardedInvocationComponent getElementRemover(final AbstractJavaLinker.ComponentLinkRequest req) throws Exception
getElementSetterback to summary
private GuardedInvocationComponent getElementSetter(final AbstractJavaLinker.ComponentLinkRequest req) throws Exception
getGuardedInvocationComponentback to summary
protected GuardedInvocationComponent getGuardedInvocationComponent(final AbstractJavaLinker.ComponentLinkRequest req) throws Exception

Overrides jdk.dynalink.beans.AbstractJavaLinker.getGuardedInvocationComponent.

Annotations
@Override
getTypedNameback to summary
private static Object getTypedName(final Object name, final boolean isMap, final LinkerServices linkerServices) throws Exception
guardComponentWithRangeCheckback to summary
private static GuardedInvocationComponent guardComponentWithRangeCheck(final BeanLinker.GuardedInvocationComponentAndCollectionType gicact, final MethodType callSiteType, final GuardedInvocationComponent nextComponent, final BeanLinker.Binder binder, final MethodHandle noOp)
guardedInvocationComponentAndCollectionTypeback to summary
private BeanLinker.GuardedInvocationComponentAndCollectionType guardedInvocationComponentAndCollectionType(final MethodType callSiteType, final LinkerServices linkerServices, final Function<Class<?>, MethodHandle> arrayMethod, final MethodHandle listMethod, final MethodHandle mapMethod)
noOpback to summary
private static void noOp()
Annotations
@SuppressWarnings:unused
rangeCheckback to summary
private static boolean rangeCheck(final Object array, final Object index)
Annotations
@SuppressWarnings:unused
rangeCheckback to summary
private static boolean rangeCheck(final List<?> list, final Object index)
Annotations
@SuppressWarnings:unused
jdk.dynalink.beans back to summary

private Class BeanLinker.Binder

extends Object
Class Inheritance

Contains methods to adapt an item getter/setter method handle to the requested type, optionally binding it to a fixed key first.

Field Summary

Modifier and TypeField and Description
private final Object
private final LinkerServices
private final MethodType

Constructor Summary

AccessConstructor and Description
pack-priv
Binder(final LinkerServices linkerServices, final MethodType methodType, final Object fixedKey)

Method Summary

Modifier and TypeMethod and Description
pack-priv MethodHandle
bind(final MethodHandle handle)

pack-priv MethodHandle
bindTest(final MethodHandle handle)

private MethodHandle
pack-priv MethodHandle
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fixedKeyback to summary
private final Object fixedKey
linkerServicesback to summary
private final LinkerServices linkerServices
methodTypeback to summary
private final MethodType methodType

Constructor Detail

Binderback to summary
pack-priv Binder(final LinkerServices linkerServices, final MethodType methodType, final Object fixedKey)

Method Detail

bindback to summary
pack-priv MethodHandle bind(final MethodHandle handle)
bindTestback to summary
pack-priv MethodHandle bindTest(final MethodHandle handle)
bindToFixedKeyback to summary
private MethodHandle bindToFixedKey(final MethodHandle handle)
convertArgToNumberback to summary
pack-priv MethodHandle convertArgToNumber(final MethodHandle mh)
jdk.dynalink.beans back to summary

private final Enum BeanLinker.CollectionType

extends Enum<BeanLinker.CollectionType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final BeanLinker.CollectionType
public static final BeanLinker.CollectionType
public static final BeanLinker.CollectionType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BeanLinker.CollectionType
public static BeanLinker.CollectionType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ARRAYback to summary
public static final BeanLinker.CollectionType ARRAY
LISTback to summary
public static final BeanLinker.CollectionType LIST
MAPback to summary
public static final BeanLinker.CollectionType MAP

Constructor Detail

CollectionTypeback to summary
private CollectionType()

Method Detail

valueOfback to summary
public static BeanLinker.CollectionType valueOf(String name)
valuesback to summary
public static BeanLinker.CollectionType[] values()
jdk.dynalink.beans back to summary

private Class BeanLinker.GuardedInvocationComponentAndCollectionType

extends Object
Class Inheritance
  • java.lang.Object
  • jdk.dynalink.beans.BeanLinker.GuardedInvocationComponentAndCollectionType

Field Summary

Modifier and TypeField and Description
pack-priv final BeanLinker.CollectionType
pack-priv final GuardedInvocationComponent

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

collectionTypeback to summary
pack-priv final BeanLinker.CollectionType collectionType
gicback to summary
pack-priv final GuardedInvocationComponent gic

Constructor Detail

GuardedInvocationComponentAndCollectionTypeback to summary
pack-priv GuardedInvocationComponentAndCollectionType(final GuardedInvocationComponent gic, final BeanLinker.CollectionType collectionType)