org.apache.cocoon.sax.util
Class VariableExpressionTokenizer

java.lang.Object
  extended by org.apache.cocoon.sax.util.VariableExpressionTokenizer

public final class VariableExpressionTokenizer
extends Object

Parses "Text {module:{module:attribute}} more text {variable}" types of expressions. Supports escaping of braces with '\' character, and nested expressions.


Nested Class Summary
static interface VariableExpressionTokenizer.TokenReceiver
          Callback for tokenizer
 
Method Summary
static void tokenize(String expression, VariableExpressionTokenizer.TokenReceiver receiver)
          Tokenizes specified expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

tokenize

public static void tokenize(String expression,
                            VariableExpressionTokenizer.TokenReceiver receiver)
                     throws ParseException
Tokenizes specified expression. Passes tokens to the reciever.

Throws:
PatternSyntaxException - if expression is not valid
ParseException


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.