CAMEL-6841 xpath() method in the RouteBuilder should support to specify the 
return type


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1f097617
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1f097617
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1f097617

Branch: refs/heads/master
Commit: 1f097617315c28ef8eac1e510fad6efe13749dc5
Parents: a5e82ad
Author: Willem Jiang <ningji...@apache.org>
Authored: Wed Oct 9 11:39:47 2013 +0800
Committer: Willem Jiang <ningji...@apache.org>
Committed: Wed Oct 9 11:39:47 2013 +0800

----------------------------------------------------------------------
 .../java/org/apache/camel/builder/BuilderSupport.java   | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1f097617/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java 
b/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java
index 8b9f924..5de21d2 100644
--- a/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java
+++ b/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java
@@ -154,10 +154,22 @@ public abstract class BuilderSupport {
 
     /**
      * Returns a xpath expression value builder
+     * @param value The XPath expression
+     * @return A new XPathBuilder object
      */
     public XPathBuilder xpath(String value) {
         return XPathBuilder.xpath(value);
     }
+    
+    /**
+     * Returns a xpath expression value builder
+     * @param value The XPath expression
+     * @param resultType The result type that the XPath expression will return.
+     * @return A new XPathBuilder object
+     */
+    public static XPathBuilder xpath(String value, Class<?> resultType) {
+        return XPathBuilder.xpath(value, resultType);
+    }
 
     /**
      * Returns a <a href="http://camel.apache.org/bean-language.html";>method 
call expression</a>

Reply via email to