Package org.apache.camel.component.bean
Class BeanHelper
java.lang.Object
org.apache.camel.component.bean.BeanHelper
Helper for the bean component.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?>
getValidParameterType
(String value) Determines and maps the given value is valid according to the supported values by the bean component.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.static boolean
isValidParameterValue
(String value) Determines if the given value is valid according to the supported values by the bean component.
-
Method Details
-
getValidParameterType
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
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.class
- Simple class name - MyOrder.class
- Parameters:
resolver
- the class resolverparameterType
- the parameter type as a String, can be a FQN or a simple name of the class (must end with .class)expectedType
- the expected type- Returns:
- null if parameter type is not a class, true if parameter type is assignable, false if not assignable
-