[ https://issues.apache.org/jira/browse/CAMEL-3515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982256#action_12982256 ]
Claus Ibsen commented on CAMEL-3515: ------------------------------------ We can also support using wildcards, reg exp, or a ends with check in the type name. So if you have a domain object with the FQN {{com.mycompany.myproject.foo.bar.Customer}}, then it would be a tedious to have to type that, instead you can do {code} method=doSomething(*Customer) {code} Using a * for wildcard. We could even just default that, so people dont have to type FQN. Which they still can do if needed. A simple way of implementing this would be to use {{endsWith}} when comparing the input with the parameter type FQN class name. > Improve the bean parameter binding parameterType option > ------------------------------------------------------- > > Key: CAMEL-3515 > URL: https://issues.apache.org/jira/browse/CAMEL-3515 > Project: Camel > Issue Type: Sub-task > Components: camel-core > Reporter: Claus Ibsen > Assignee: Christian Müller > Priority: Minor > Fix For: 2.7.0 > > > We need this new feature documented > http://camel.apache.org/bean > And we need this option on the these > - MethodCallExpression > - BeanExpression > And we need unit tests which uses the method call expression in > - camel-core > - camel-spring > Also the String -> Class converter should use the ClassResolver API from > CamelContext. This ensure it runs in OSGi, JBoss, J2EE etc. > What you do is just add Exchange as the 2nd parameter and Camel provides it > to you > {code} > /** > * Returns the converted value, or null if the value is null > */ > @SuppressWarnings("rawtypes") > @Converter > public static Class toClass(Object value, Exchange exchange) { > if (value instanceof Class) { > return (Class) value; > } else if (value instanceof String) { > // prefer to use class resolver API > if (exchange != null) { > return > exchange.getContext().getClassResolver().resolveClass((String) value); > } else { > return ObjectHelper.loadClass((String) value); > } > } else { > return null; > } > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.