Package org.apache.camel.component.bean
Class BeanHelper
- java.lang.Object
-
- org.apache.camel.component.bean.BeanHelper
-
public final class BeanHelper extends Object
Helper for the bean component.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class<?>getValidParameterType(String value)Determines and maps the given value is valid according to the supported values by the bean component.static BooleanisAssignableToExpectedType(org.apache.camel.spi.ClassResolver resolver, String parameterType, Class<?> expectedType)Determines if the given parameter type is assignable to the expected type.static booleanisValidParameterValue(String value)Determines if the given value is valid according to the supported values by the bean component.
-
-
-
Method Detail
-
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
- Parameters:
resolver- the class resolverparameterType- the parameter type as a String, can be a FQN or a simple name of the classexpectedType- the expected type- Returns:
- null if parameter type is not a class, true if parameter type is assignable, false if not assignable
-
-