org.apache.camel.component.bean
Class BeanHelper

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

public final class BeanHelper
extends Object

Helper for the bean component.


Method Summary
static Boolean isAssignableToExpectedType(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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

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


Apache CAMEL