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 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

      protected boolean isCandidateForProperty(Method method, Class<?> targetClass)
      Overrides:
      isCandidateForProperty in class org.springframework.expression.spel.support.ReflectivePropertyAccessor