Class BeanHelper

java.lang.Object
org.apache.camel.component.bean.BeanHelper

public final class BeanHelper extends Object
Helper for the bean component.
  • Method Details

    • getValidParameterType

      public static Class<?> getValidParameterType(String value)
      Determines and maps the given value is valid according to the supported values by the bean component.
      Parameters:
      value - the value
      Returns:
      the parameter type the given value is being mapped as, or null if not valid.
    • isValidParameterValue

      public static boolean isValidParameterValue(String value)
      Determines if the given value is valid according to the supported values by the bean component.
      Parameters:
      value - the value
      Returns:
      true if valid, false otherwise
    • isAssignableToExpectedType

      public static Boolean isAssignableToExpectedType(org.apache.camel.spi.ClassResolver resolver, String parameterType, Class<?> expectedType)
      Determines if the given parameter type is assignable to the expected type.

      This implementation will check if the given parameter type matches the expected type as class using either

      • FQN class name - com.foo.MyOrder
      • Simple class name - MyOrder
      If the given parameter type is not a class, then null is returned
      Parameters:
      resolver - the class resolver
      parameterType - the parameter type as a String, can be a FQN or a simple name of the class
      expectedType - the expected type
      Returns:
      null if parameter type is not a class, true if parameter type is assignable, false if not assignable