camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [7/8] git commit: CAMEL-6841 xpath() method in the RouteBuilder should support to specify the return type
Date Wed, 09 Oct 2013 04:27:23 GMT
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/4ac76aec
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4ac76aec
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4ac76aec

Branch: refs/heads/camel-2.11.x
Commit: 4ac76aec4e6b411818e0596bef1367797faaaa82
Parents: b1a7eaf
Author: Willem Jiang <ningjiang@apache.org>
Authored: Wed Oct 9 11:39:47 2013 +0800
Committer: Willem Jiang <ningjiang@apache.org>
Committed: Wed Oct 9 11:56:28 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/4ac76aec/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>


Mime
View raw message