org.nuiton.guix
Class BindingUtils

java.lang.Object
  extended by org.nuiton.guix.BindingUtils

public class BindingUtils
extends java.lang.Object

Author:
kmorin

Field Summary
protected static java.util.regex.Matcher leftBraceMatcher
          left brace matcher
protected static java.util.regex.Matcher rightBraceMatcher
          right brace matcher
 
Constructor Summary
BindingUtils()
           
 
Method Summary
protected static java.lang.String escapeJavaString(java.lang.String raw)
          Escapes a string using standard Java escape sequences, generally in preparation to including it in a string literal in a compiled Java file.
protected static int getNextLeftBrace(java.lang.String string, int pos)
           
protected static int getNextRightBrace(java.lang.String string, int pos)
           
static java.lang.String processDataBindings(java.lang.String stringValue)
          Examine an attribute value for data binding expressions.
static java.util.List<java.lang.String[]> scanNode(SimpleNode node)
          Examines a node to identify any dependencies it contains.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

leftBraceMatcher

protected static java.util.regex.Matcher leftBraceMatcher
left brace matcher


rightBraceMatcher

protected static java.util.regex.Matcher rightBraceMatcher
right brace matcher

Constructor Detail

BindingUtils

public BindingUtils()
Method Detail

processDataBindings

public static java.lang.String processDataBindings(java.lang.String stringValue)
Examine an attribute value for data binding expressions. Returns a 'cooked' expression which can be used to determine the resulting value. If the attribute value does not invoke data binding, this method returns null

Parameters:
stringValue - the string value of the property from the XML
Returns:
a processed version of the expression

getNextLeftBrace

protected static int getNextLeftBrace(java.lang.String string,
                                      int pos)

getNextRightBrace

protected static int getNextRightBrace(java.lang.String string,
                                       int pos)

escapeJavaString

protected static java.lang.String escapeJavaString(java.lang.String raw)
Escapes a string using standard Java escape sequences, generally in preparation to including it in a string literal in a compiled Java file.

Parameters:
raw - the raw string to be escape
Returns:
a string in which all 'dangerous' characters have been replaced by equivalent Java escape sequences

scanNode

public static java.util.List<java.lang.String[]> scanNode(SimpleNode node)
                                                   throws CompilerException
Examines a node to identify any dependencies it contains.

Parameters:
node - node to scan
Returns:
the decomposed expression into tokens
Throws:
CompilerException - ?


Copyright © 2009 CodeLutin. All Rights Reserved.