public class DataBindingHelper extends Object
JAXXCompiler more simple and clear.
Created: 27 nov. 2009| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Integer> |
autoUnsafeGenIds
Counter by unsafe type
|
protected JAXXCompiler |
compiler
Associated compiler
|
protected List<DataBinding> |
dataBindings
Registred data binding for the compiler, then after the invocation of method
finalizeBindings()
only the real data bindings, the simple bindings will be moved to simpleBindings. |
protected static Matcher |
leftBraceMatcher
left brace matcher
|
protected static Matcher |
rightBraceMatcher
right brace matcher
|
static boolean |
SHOW_LOG
To debug binding without any log interference
|
protected List<DataBinding> |
simpleBindings
Simpel bindings for the compiler
|
| Constructor and Description |
|---|
DataBindingHelper(JAXXCompiler compiler) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
finalizeBindings()
Compile all binding discovered previously.
|
DataBinding[] |
getDataBindings() |
protected static int |
getNextLeftBrace(String string,
int pos) |
protected static int |
getNextRightBrace(String string,
int pos) |
String |
getSafeId(String id)
Obtain the next safe id for the given binding id.
|
DataBinding[] |
getSimpleBindings() |
static String |
processDataBindings(String stringValue)
Examine an attribute value for data binding expressions.
|
void |
registerDataBinding(DataBinding binding) |
void |
registerDataBinding(String id,
String binding,
String assignment) |
void |
revertSafeId(String id)
Revert a previous computed safe id.
|
public static boolean SHOW_LOG
protected static final Matcher leftBraceMatcher
protected static final Matcher rightBraceMatcher
protected final List<DataBinding> dataBindings
finalizeBindings()
only the real data bindings, the simple bindings will be moved to simpleBindings.protected final List<DataBinding> simpleBindings
protected final JAXXCompiler compiler
public DataBindingHelper(JAXXCompiler compiler)
public static String processDataBindings(String stringValue) throws CompilerException
registerDataBinding(java.lang.String, java.lang.String, java.lang.String).
If the attribute value does not invoke data binding, this method returns nullstringValue - the string value of the property from the XMLCompilerException - ?public DataBinding[] getDataBindings()
public DataBinding[] getSimpleBindings()
public void registerDataBinding(DataBinding binding)
public void clear()
public String getSafeId(String id)
_XXX until
found a free id.id - the id of the bindingpublic void revertSafeId(String id)
id - the original id to revert in counter.public void finalizeBindings()
dataBindings to simpleBindings.protected static int getNextLeftBrace(String string, int pos)
protected static int getNextRightBrace(String string, int pos)
Copyright © 2008–2017 Ultreia.io. All rights reserved.