StaticClassLinker and BeanLinker. Deals with common aspects of property
exposure and method calls for both static and instance facets of a class.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final MethodHandle | |
| private final MethodHandle | |
| pack-priv final Class | |
| 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 final MethodHandle | |
| private final MethodHandle | |
| private final MethodHandle | |
| private static final MethodHandle | |
| private static final MethodHandle | |
| private static final MethodHandle | |
| private static final MethodHandle | |
| private final Map | |
| private static final MethodHandle | |
| private static final Lookup | |
| private final Map | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | AbstractJavaLinker(final Class<?> clazz, final MethodHandle classGuard, final MethodHandle assignableGuard)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | addMember(final String name, final SingleDynamicMethod method, final Map<String, DynamicMethod> methodMap)
|
| private static void | |
| pack-priv static DynamicMethod | Returns: a dynamic method representing all the specified reflective members.the reflective members members, final Class<?> the class declaring the reflective members clazz, final String the common name of the reflective members. name)Given one or more reflective methods or constructors, creates a dynamic method that represents them all. |
| private static SingleDynamicMethod | Returns: the single dynamic method representing the reflective memberthe reflective member m)Given a reflective method or a constructor, creates a dynamic method that represents it. |
| pack-priv abstract FacetIntrospector | |
| private GuardedInvocation | createGuardedDynamicMethodInvocation(final CallSiteDescriptor callSiteDescriptor, final LinkerServices linkerServices, final String methodName, final Map<String, DynamicMethod> methodMap)
|
| private GuardedInvocationComponent | createNoSuchMemberHandler(final MissingMemberHandlerFactory missingMemberHandlerFactory, final LinkRequest linkRequest, final LinkerServices linkerServices)
|
| private static String | |
| private MethodHandle | |
| pack-priv MethodHandle | |
| pack-priv GuardedInvocationComponent | |
| pack-priv abstract SingleDynamicMethod | |
| private DynamicMethod | |
| private Object | |
| pack-priv DynamicMethod | Returns: the dynamic method (eitherSimpleDynamicMethod or OverloadedDynamicMethod, or null if the
method with the specified name does not exist.name of the method name)Returns a dynamic method of the specified name. |
| private MethodHandle | getDynamicMethodInvocation(final CallSiteDescriptor callSiteDescriptor, final LinkerServices linkerServices, final String methodName, final Map<String, DynamicMethod> methodMap)
|
| private SingleDynamicMethod | getExplicitSignatureDynamicMethod(final String fullName, final Map<String, DynamicMethod> methodsMap)
|
| private MethodHandle | getGuard(final GuardedInvocationComponent.
|
| public GuardedInvocation | getGuardedInvocation(final LinkRequest request, final LinkerServices linkerServices)
Implements jdk. Creates a guarded invocation appropriate for a particular invocation with the specified arguments at a call site. |
| protected GuardedInvocationComponent | |
| private GuardedInvocationComponent | |
| private static MethodType | |
| pack-priv Set | |
| private static Method | Returns: getter with same name, declared on the most generic superclass/interface of the declaring classthe getter getter)Find the most generic superclass that declares this getter. |
| private static Method | |
| private GuardedInvocationComponent | |
| private GuardedInvocationComponent | |
| private GuardedInvocationComponent | |
| pack-priv GuardedInvocationComponent | |
| private GuardedInvocationComponent | |
| private Object | getPropertyGetterHandle(final Object
the property ID id)Returns: the method handle for retrieving the property, or null if the property does not exist |
| private GuardedInvocationComponent | |
| private MethodHandle | getPropertySetterHandle(final CallSiteDescriptor setterDescriptor, final LinkerServices linkerServices, final Object id)
|
| pack-priv Set | |
| private static Set | |
| private GuardedInvocationComponent | |
| private GuardedInvocationComponent | |
| private GuardedInvocationComponent | |
| pack-priv Set | |
| pack-priv static AbstractJavaLinker. | |
| private static DynamicMethod | mergeMethods(final SingleDynamicMethod method, final DynamicMethod existing, final Class<?> clazz, final String name)
|
| private void | setPropertyGetter(final String
name of the property name, final SingleDynamicMethod the method handle that implements the property getter handle, final GuardedInvocationComponent.the validation type for the property validationTypeSets the specified dynamic method to be the property getter for the specified property. |
| private void | setPropertyGetter(final Method
the getter method getter, final int the getter prefix in the method name; should be 3 for getter names starting with "get" and 2 for
names starting with "is". prefixLen)Sets the specified reflective method to be the property getter for the specified property. |
| pack-priv void | setPropertyGetter(final String
name of the property name, final MethodHandle the method handle that implements the property getter handle, final GuardedInvocationComponent.the validation type for the property validationTypeSets the specified method handle to be the property getter for the specified property. |
| private static MethodHandle | Returns: the method handlethe method or constructor m)Unreflects a method handle from a Method or a Constructor using safe (zero-privilege) unreflection. |
| assignableGuard | back to summary |
|---|---|
| private final MethodHandle assignableGuard | |
| classGuard | back to summary |
|---|---|
| private final MethodHandle classGuard | |
| clazz | back to summary |
|---|---|
| pack-priv final Class<?> clazz | |
| CONSTANT_NULL_DROP_ANNOTATED_METHOD | back to summary |
|---|---|
| private static final MethodHandle CONSTANT_NULL_DROP_ANNOTATED_METHOD | |
| CONSTANT_NULL_DROP_METHOD_HANDLE | back to summary |
|---|---|
| private static final MethodHandle CONSTANT_NULL_DROP_METHOD_HANDLE | |
| GET_ANNOTATED_METHOD | back to summary |
|---|---|
| private static final MethodHandle GET_ANNOTATED_METHOD | |
| GET_DYNAMIC_METHOD | back to summary |
|---|---|
| private static final MethodHandle GET_DYNAMIC_METHOD | |
| GET_PROPERTY_GETTER_HANDLE | back to summary |
|---|---|
| private static final MethodHandle GET_PROPERTY_GETTER_HANDLE | |
| GET_PROPERTY_SETTER_HANDLE | back to summary |
|---|---|
| private static final MethodHandle GET_PROPERTY_SETTER_HANDLE | |
| getDynamicMethod | back to summary |
|---|---|
| private final MethodHandle getDynamicMethod | |
| getPropertyGetterHandle | back to summary |
|---|---|
| private final MethodHandle getPropertyGetterHandle | |
| getPropertySetterHandle | back to summary |
|---|---|
| private final MethodHandle getPropertySetterHandle | |
| GETTER_INVOKER | back to summary |
|---|---|
| private static final MethodHandle GETTER_INVOKER | |
| IS_ANNOTATED_METHOD_NOT_NULL | back to summary |
|---|---|
| private static final MethodHandle IS_ANNOTATED_METHOD_NOT_NULL | |
| IS_DYNAMIC_METHOD | back to summary |
|---|---|
| private static final MethodHandle IS_DYNAMIC_METHOD | |
| IS_METHOD_HANDLE_NOT_NULL | back to summary |
|---|---|
| private static final MethodHandle IS_METHOD_HANDLE_NOT_NULL | |
| methods | back to summary |
|---|---|
| private final Map<String, DynamicMethod> methods | |
| OBJECT_IDENTITY | back to summary |
|---|---|
| private static final MethodHandle OBJECT_IDENTITY | |
| privateLookup | back to summary |
|---|---|
| private static final Lookup privateLookup | |
| propertyGetters | back to summary |
|---|---|
| private final Map<String, AbstractJavaLinker. | |
| propertySetters | back to summary |
|---|---|
| private final Map<String, DynamicMethod> propertySetters | |
| AbstractJavaLinker | back to summary |
|---|---|
| pack-priv AbstractJavaLinker(final Class<?> clazz, final MethodHandle classGuard) | |
| AbstractJavaLinker | back to summary |
|---|---|
| pack-priv AbstractJavaLinker(final Class<?> clazz, final MethodHandle classGuard, final MethodHandle assignableGuard) | |
| addMember | back to summary |
|---|---|
| private void addMember(final String name, final Executable m, final Map<String, DynamicMethod> methodMap) | |
| addMember | back to summary |
|---|---|
| private void addMember(final String name, final SingleDynamicMethod method, final Map<String, DynamicMethod> methodMap) | |
| assertParameterCount | back to summary |
|---|---|
| private static void assertParameterCount(final CallSiteDescriptor descriptor, final int paramCount) | |
| createDynamicMethod | back to summary |
|---|---|
| pack-priv static DynamicMethod createDynamicMethod(final Iterable<? extends Executable> members, final Class<?> clazz, final String name) Given one or more reflective methods or constructors, creates a dynamic method that represents them all. The methods should represent all overloads of the same name (or all constructors of the class).
| |
| createDynamicMethod | back to summary |
|---|---|
| private static SingleDynamicMethod createDynamicMethod(final Executable m) Given a reflective method or a constructor, creates a dynamic method that represents it. This method will distinguish between caller sensitive and ordinary methods/constructors, and create appropriate caller sensitive dynamic method when needed.
| |
| createFacetIntrospector | back to summary |
|---|---|
| pack-priv abstract FacetIntrospector createFacetIntrospector() | |
| createGuardedDynamicMethodInvocation | back to summary |
|---|---|
| private GuardedInvocation createGuardedDynamicMethodInvocation(final CallSiteDescriptor callSiteDescriptor, final LinkerServices linkerServices, final String methodName, final Map<String, DynamicMethod> methodMap) | |
| createNoSuchMemberHandler | back to summary |
|---|---|
| private GuardedInvocationComponent createNoSuchMemberHandler(final MissingMemberHandlerFactory missingMemberHandlerFactory, final LinkRequest linkRequest, final LinkerServices linkerServices) throws Exception | |
| decapitalize | back to summary |
|---|---|
| private static String decapitalize(final String str) | |
| getAssignableGuard | back to summary |
|---|---|
| private MethodHandle getAssignableGuard(final MethodType type) | |
| getClassGuard | back to summary |
|---|---|
| pack-priv MethodHandle getClassGuard(final MethodType type) | |
| getClassGuardedInvocationComponent | back to summary |
|---|---|
| pack-priv GuardedInvocationComponent getClassGuardedInvocationComponent(final MethodHandle invocation, final MethodType type) | |
| getConstructorMethod | back to summary |
|---|---|
| pack-priv abstract SingleDynamicMethod getConstructorMethod(final String signature) | |
| getDynamicMethod | back to summary |
|---|---|
| private DynamicMethod getDynamicMethod(final String methodName, final Map<String, DynamicMethod> methodMap) | |
| getDynamicMethod | back to summary |
|---|---|
private Object getDynamicMethod(final Object name)
| |
| getDynamicMethod | back to summary |
|---|---|
| pack-priv DynamicMethod getDynamicMethod(final String name) Returns a dynamic method of the specified name.
| |
| getDynamicMethodInvocation | back to summary |
|---|---|
| private MethodHandle getDynamicMethodInvocation(final CallSiteDescriptor callSiteDescriptor, final LinkerServices linkerServices, final String methodName, final Map<String, DynamicMethod> methodMap) | |
| getExplicitSignatureDynamicMethod | back to summary |
|---|---|
| private SingleDynamicMethod getExplicitSignatureDynamicMethod(final String fullName, final Map<String, DynamicMethod> methodsMap) | |
| getGuard | back to summary |
|---|---|
| private MethodHandle getGuard(final GuardedInvocationComponent. | |
| getGuardedInvocation | back to summary |
|---|---|
| public GuardedInvocation getGuardedInvocation(final LinkRequest request, 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. | |
| getGuardedInvocationComponent | back to summary |
|---|---|
| protected GuardedInvocationComponent getGuardedInvocationComponent(final AbstractJavaLinker. | |
| getMethodGetter | back to summary |
|---|---|
| private GuardedInvocationComponent getMethodGetter(final AbstractJavaLinker. | |
| getMethodGetterType | back to summary |
|---|---|
| private static MethodType getMethodGetterType(final AbstractJavaLinker. | |
| getMethodNames | back to summary |
|---|---|
| pack-priv Set | |
| getMostGenericGetter | back to summary |
|---|---|
| private static Method getMostGenericGetter(final Method getter) Find the most generic superclass that declares this getter. Since getters have zero args (aside from the receiver), they can't be overloaded, so we're free to link with an instanceof guard for the most generic one, creating more stable call sites. | |
| getMostGenericGetter | back to summary |
|---|---|
| private static Method getMostGenericGetter(final String name, final Class<?> declaringClass) | |
| getNamedMethodGetter | back to summary |
|---|---|
| private GuardedInvocationComponent getNamedMethodGetter(final AbstractJavaLinker. | |
| getNamedPropertyGetter | back to summary |
|---|---|
| private GuardedInvocationComponent getNamedPropertyGetter(final AbstractJavaLinker. | |
| getNamedPropertySetter | back to summary |
|---|---|
| private GuardedInvocationComponent getNamedPropertySetter(final AbstractJavaLinker. | |
| getNextComponent | back to summary |
|---|---|
| pack-priv GuardedInvocationComponent getNextComponent(final AbstractJavaLinker. | |
| getPropertyGetter | back to summary |
|---|---|
| private GuardedInvocationComponent getPropertyGetter(final AbstractJavaLinker. | |
| getPropertyGetterHandle | back to summary |
|---|---|
private Object getPropertyGetterHandle(final Object id)
| |
| getPropertySetter | back to summary |
|---|---|
| private GuardedInvocationComponent getPropertySetter(final AbstractJavaLinker. | |
| getPropertySetterHandle | back to summary |
|---|---|
private MethodHandle getPropertySetterHandle(final CallSiteDescriptor setterDescriptor, final LinkerServices linkerServices, final Object id)
| |
| getReadablePropertyNames | back to summary |
|---|---|
| pack-priv Set | |
| getUnmodifiableKeys | back to summary |
|---|---|
| private static Set | |
| getUnnamedMethodGetter | back to summary |
|---|---|
| private GuardedInvocationComponent getUnnamedMethodGetter(final AbstractJavaLinker. | |
| getUnnamedPropertyGetter | back to summary |
|---|---|
| private GuardedInvocationComponent getUnnamedPropertyGetter(final AbstractJavaLinker. | |
| getUnnamedPropertySetter | back to summary |
|---|---|
| private GuardedInvocationComponent getUnnamedPropertySetter(final AbstractJavaLinker. | |
| getWritablePropertyNames | back to summary |
|---|---|
| pack-priv Set | |
| matchReturnTypes | back to summary |
|---|---|
| pack-priv static AbstractJavaLinker. | |
| mergeMethods | back to summary |
|---|---|
| private static DynamicMethod mergeMethods(final SingleDynamicMethod method, final DynamicMethod existing, final Class<?> clazz, final String name) | |
| setPropertyGetter | back to summary |
|---|---|
| private void setPropertyGetter(final String name, final SingleDynamicMethod handle, final GuardedInvocationComponent. Sets the specified dynamic method to be the property getter for the specified property. Note that you can only
use this when you're certain that the method handle does not belong to a caller-sensitive method. For properties
that are caller-sensitive, you must use
| |
| setPropertyGetter | back to summary |
|---|---|
| private void setPropertyGetter(final Method getter, final int prefixLen) Sets the specified reflective method to be the property getter for the specified property.
| |
| setPropertyGetter | back to summary |
|---|---|
| pack-priv void setPropertyGetter(final String name, final MethodHandle handle, final GuardedInvocationComponent. Sets the specified method handle to be the property getter for the specified property. Note that you can only
use this when you're certain that the method handle does not belong to a caller-sensitive method. For properties
that are caller-sensitive, you must use
| |
| unreflectSafely | back to summary |
|---|---|
| private static MethodHandle unreflectSafely(final Executable m) Unreflects a method handle from a Method or a Constructor using safe (zero-privilege) unreflection. Should be only used for methods and constructors that are not caller sensitive. If a caller sensitive method were unreflected through this mechanism, it would not be a security issue, but would be bound to the zero-privilege unreflector as its caller, and thus completely useless.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final SingleDynamicMethod | |
| pack-priv final GuardedInvocationComponent. |
| Access | Constructor and Description |
|---|---|
| pack-priv | AnnotatedDynamicMethod(final SingleDynamicMethod method, final GuardedInvocationComponent.
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv MethodHandle | |
| pack-priv MethodHandle |
| method | back to summary |
|---|---|
| private final SingleDynamicMethod method | |
| validationType | back to summary |
|---|---|
| pack-priv final GuardedInvocationComponent. | |
| AnnotatedDynamicMethod | back to summary |
|---|---|
| pack-priv AnnotatedDynamicMethod(final SingleDynamicMethod method, final GuardedInvocationComponent. | |
| getInvocation | back to summary |
|---|---|
| pack-priv MethodHandle getInvocation(final AbstractJavaLinker. | |
| getTarget | back to summary |
|---|---|
pack-priv MethodHandle getTarget(final CallSiteDescriptor desc, final LinkerServices linkerServices)
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Operation | |
| pack-priv final LinkerServices | |
| pack-priv final LinkRequest | |
| pack-priv final MissingMemberHandlerFactory | |
| pack-priv final Object | |
| pack-priv final List |
| Access | Constructor and Description |
|---|---|
| pack-priv | ComponentLinkRequest(final LinkRequest linkRequest, final LinkerServices linkerServices, final MissingMemberHandlerFactory missingMemberHandlerFactory)
|
| private | ComponentLinkRequest(final LinkRequest linkRequest, final LinkerServices linkerServices, final MissingMemberHandlerFactory missingMemberHandlerFactory, final Operation baseOperation, final List<Namespace> namespaces, final Object name)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv CallSiteDescriptor | |
| pack-priv AbstractJavaLinker. |
| baseOperation | back to summary |
|---|---|
| pack-priv final Operation baseOperation | |
| linkerServices | back to summary |
|---|---|
| pack-priv final LinkerServices linkerServices | |
| linkRequest | back to summary |
|---|---|
| pack-priv final LinkRequest linkRequest | |
| missingMemberHandlerFactory | back to summary |
|---|---|
| pack-priv final MissingMemberHandlerFactory missingMemberHandlerFactory | |
| name | back to summary |
|---|---|
| pack-priv final Object name | |
| namespaces | back to summary |
|---|---|
| pack-priv final List<Namespace> namespaces | |
| ComponentLinkRequest | back to summary |
|---|---|
| pack-priv ComponentLinkRequest(final LinkRequest linkRequest, final LinkerServices linkerServices, final MissingMemberHandlerFactory missingMemberHandlerFactory) | |
| ComponentLinkRequest | back to summary |
|---|---|
| private ComponentLinkRequest(final LinkRequest linkRequest, final LinkerServices linkerServices, final MissingMemberHandlerFactory missingMemberHandlerFactory, final Operation baseOperation, final List<Namespace> namespaces, final Object name) | |
| getDescriptor | back to summary |
|---|---|
| pack-priv CallSiteDescriptor getDescriptor() | |
| popNamespace | back to summary |
|---|---|
| pack-priv AbstractJavaLinker. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final MethodHandle | |
| pack-priv final MethodHandle |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv MethodHandle |
| method1 | back to summary |
|---|---|
| pack-priv final MethodHandle method1 | |
| method2 | back to summary |
|---|---|
| pack-priv final MethodHandle method2 | |
| MethodPair | back to summary |
|---|---|
| pack-priv MethodPair(final MethodHandle method1, final MethodHandle method2) | |
| guardWithTest | back to summary |
|---|---|
| pack-priv MethodHandle guardWithTest(final MethodHandle test) | |