Class ConstrainedReflectivePropertyAccessor
java.lang.Object
org.springframework.expression.spel.support.ReflectivePropertyAccessor
com.solace.connector.core.transform.platform.customizer.ConstrainedReflectivePropertyAccessor
- All Implemented Interfaces:
org.springframework.expression.PropertyAccessor,org.springframework.expression.TargetedAccessor
public final class ConstrainedReflectivePropertyAccessor
extends org.springframework.expression.spel.support.ReflectivePropertyAccessor
A reflective property accessor that only allows access to a specific method on a specific type.
This is the property accessor equivalent to
ReflectiveIndexAccessor's constructor.-
Constructor Summary
ConstructorsConstructorDescriptionConstrainedReflectivePropertyAccessor(Class<?> targetType, Class<?> valueType, String readMethodName) Create a new instance for the given target type and read method name.ConstrainedReflectivePropertyAccessor(Class<?> targetType, Class<?> valueType, String readMethodName, String writeMethodName) Create a new instance for the given target type, read method name, and write method name. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisCandidateForProperty(Method method, Class<?> targetClass) Methods inherited from class org.springframework.expression.spel.support.ReflectivePropertyAccessor
canRead, canWrite, findField, findGetterForProperty, findSetterForProperty, getPropertyMethodSuffix, getPropertyMethodSuffixes, getSpecificTargetClasses, read, write
-
Constructor Details
-
ConstrainedReflectivePropertyAccessor
public ConstrainedReflectivePropertyAccessor(Class<?> targetType, Class<?> valueType, String readMethodName) Create a new instance for the given target type and read method name.- Parameters:
targetType- the target type. Can be a superclass or interface of the actual target object.valueType- the return value type.readMethodName- the names of the public, non-static, no-args read method that is allowed to be accessed.
-
ConstrainedReflectivePropertyAccessor
public ConstrainedReflectivePropertyAccessor(Class<?> targetType, Class<?> valueType, String readMethodName, @Nullable String writeMethodName) Create a new instance for the given target type, read method name, and write method name.- Parameters:
targetType- the target type. Can be a superclass or interface of the actual target object.valueType- the return value type for the read method. The parameter type for the write method.readMethodName- the names of the public, non-static, no-args read method that is allowed to be accessed.writeMethodName- the names of the public, non-static, single-arg write method that is allowed to be accessed.
-
-
Method Details
-
isCandidateForProperty
- Overrides:
isCandidateForPropertyin classorg.springframework.expression.spel.support.ReflectivePropertyAccessor
-