title: Apache Camel Java DSL pass class parameter to bean method
body: <p>I am using Camel 2.13.1 I want to pass a class as parameter to one of my methods in the bean</p>
  
  <p>Can I do something like</p>
  
  <pre><code>In Route
      --
       .beanRef("someSpringBeanRef","someMethod(${body},com.test.TestObject)")
      --
  
  And in Bean
        public Object someMethod(String testBody, Class type){
  </code></pre>
  
  <p>I know I can send the qualified class name in header and use it within the bean but it doesn't feel too right. Are there any other alternatives?</p>
  
  <p>I saw this link but it did not work for me
  <a href="https://stackoverflow.com/questions/18788241/apache-camel-spring-dsl-pass-string-argument-to-bean-method">Apache Camel - Spring DSL - Pass String argument to bean method</a></p>