[ 
https://issues.apache.org/activemq/browse/CAMEL-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49813#action_49813
 ] 

Claus Ibsen commented on CAMEL-1008:
------------------------------------

But sometimes you need to former when you need to build predicates
{code}
filter(header("type").in("gold,silver")).to
{code}

You cannot do that in the fluent builder
{code}
filter().header("type").in("gold,silver")).XXXX compiler gets fuzzed and you 
only have eg java.lang.Object methods, you can not continue the route to 
{code}



> remove more context-free DSL methods
> ------------------------------------
>
>                 Key: CAMEL-1008
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1008
>             Project: Apache Camel
>          Issue Type: Task
>            Reporter: James Strachan
>             Fix For: 2.0.0
>
>
> there are a number of DSL methods in the base class which can be kinda used 
> anywhere - which can lead to confusion... e.g.
> http://www.nabble.com/Non-registry-beans-td20088181s22882.html
> as part of 2.0.0 we should try zap most of the public methods which don't 
> make much sense - so we encourage folks to use the context based methods.
> e.g. rather than
> {code}
> filter(someStaticMethod).to()
> {code}
> we should prefer
> {code}
> filter().xpath("..".to()
> {code}
> i.e. using *filter().* in an IDE will show a better completion list than 
> allowing any static method import 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to