svn commit: r1169624 - in /camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple: SimpleLanguage.java SimpleTokenizer.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1169624 - in /camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple: SimpleLanguage.java SimpleTokenizer.java

davsclaus-2
Author: davsclaus
Date: Mon Sep 12 07:14:01 2011
New Revision: 1169624

URL: http://svn.apache.org/viewvc?rev=1169624&view=rev
Log:
CAMEL-3619: Polished.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleTokenizer.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java?rev=1169624&r1=1169623&r2=1169624&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java Mon Sep 12 07:14:01 2011
@@ -143,10 +143,30 @@ public class SimpleLanguage implements L
         return answer.createExpression(expression);
     }
 
+    /**
+     * Change the start tokens used for functions.
+     * <p/>
+     * This can be used to alter the function tokens to avoid clashes with other
+     * frameworks etc.
+     * <p/>
+     * The default start tokens is <tt>${</tt> and <tt>$simple{}</tt>.
+     *
+     * @param startToken new start token(s) to be used for functions
+     */
     public static void changeFunctionStartToken(String... startToken) {
         SimpleTokenizer.changeFunctionStartToken(startToken);
     }
     
+    /**
+     * Change the end tokens used for functions.
+     * <p/>
+     * This can be used to alter the function tokens to avoid clashes with other
+     * frameworks etc.
+     * <p/>
+     * The default end token is <tt>}</tt>
+     *
+     * @param endToken new end token(s) to be used for functions
+     */
     public static void changeFunctionEndToken(String... endToken) {
         SimpleTokenizer.changeFunctionEndToken(endToken);
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleTokenizer.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleTokenizer.java?rev=1169624&r1=1169623&r2=1169624&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleTokenizer.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleTokenizer.java Mon Sep 12 07:14:01 2011
@@ -73,6 +73,10 @@ public final class SimpleTokenizer {
         // static methods
     }
 
+
+    /**
+     * @see SimpleLanguage#changeFunctionStartToken(String...)
+     */
     public static void changeFunctionStartToken(String... startToken) {
         for (SimpleTokenType type : KNOWN_TOKENS) {
             if (type.getType() == TokenType.functionStart) {
@@ -80,12 +84,15 @@ public final class SimpleTokenizer {
             }
         }
 
-        // add in start as its a more common token to be used
+        // add in start of list as its a more common token to be used
         for (String token : startToken) {
             KNOWN_TOKENS.add(0, new SimpleTokenType(TokenType.functionStart, token));
         }
     }
 
+    /**
+     * @see SimpleLanguage#changeFunctionEndToken(String...)
+     */
     public static void changeFunctionEndToken(String... endToken) {
         for (SimpleTokenType type : KNOWN_TOKENS) {
             if (type.getType() == TokenType.functionEnd) {
@@ -93,7 +100,7 @@ public final class SimpleTokenizer {
             }
         }
 
-        // add in start as its a more common token to be used
+        // add in start of list as its a more common token to be used
         for (String token : endToken) {
             KNOWN_TOKENS.add(0, new SimpleTokenType(TokenType.functionEnd, token));
         }