public class DataBinding extends Object
DataBinding uses
DataSource to track changes to a source expression and update
the destination.| Modifier and Type | Field and Description |
|---|---|
protected String |
constantId
|
protected DataSource |
dataSource
Compiled data source
|
protected String |
initDataBinding
code to register the databinding (null if no binding)
|
protected static org.apache.commons.logging.Log |
log
Logger.
|
protected List<JavaMethod> |
methods
Extra method to add to the binding
|
protected String |
processDataBinding
code to add to processDataBinding (null if no binding)
|
| Constructor and Description |
|---|
DataBinding(String id,
String source,
String assignment,
boolean quickNoDependencies)
Creates a new data binding.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
compile(JAXXCompiler compiler)
Compiles the data binding expression.
|
String |
getAssignment() |
protected String |
getAssignment(JAXXCompiler compiler,
Set<String> overrides) |
String |
getConstantId() |
String |
getInitDataBinding() |
protected String |
getInitDataBindingCode(JAXXCompiler compiler,
DataSource dataSource,
boolean isBinding) |
List<JavaMethod> |
getMethods() |
String |
getProcessDataBinding() |
protected String |
getProcessDataBindingCode(JAXXCompiler compiler,
DataSource dataSource,
boolean isBinding) |
String |
getRealId() |
String |
getSource() |
DataListener[] |
getTrackers() |
boolean |
isQuickNoDependencies() |
protected String |
replaceOverrides(JAXXCompiler compiler,
Set<String> overrides,
String code) |
String |
toString() |
protected static final org.apache.commons.logging.Log log
protected String constantId
protected DataSource dataSource
protected String processDataBinding
protected String initDataBinding
protected final List<JavaMethod> methods
public DataBinding(String id, String source, String assignment, boolean quickNoDependencies)
id - the data binding destination in the form id.propertyNamesource - the Java source code for the data binding expressionassignment - Java snippet which will cause the destination property to be updated with the current value of the bindingquickNoDependencies - internal flag to not treate process databinding in not a real bindingpublic String getAssignment()
public String getSource()
public boolean isQuickNoDependencies()
public String getProcessDataBinding()
public String getInitDataBinding()
public DataListener[] getTrackers()
public String getRealId()
public String getConstantId()
public List<JavaMethod> getMethods()
public boolean compile(JAXXCompiler compiler) throws CompilerException
JAXXCompiler to add the Java code that performs the data
binding setup.compiler - compiler which includes the data bindingtrue if the expression has dependencies, false otherwiseCompilerException - if a compilation error occursprotected String getInitDataBindingCode(JAXXCompiler compiler, DataSource dataSource, boolean isBinding)
protected String getProcessDataBindingCode(JAXXCompiler compiler, DataSource dataSource, boolean isBinding)
protected String getAssignment(JAXXCompiler compiler, Set<String> overrides)
protected String replaceOverrides(JAXXCompiler compiler, Set<String> overrides, String code)
Copyright © 2008–2017 Ultreia.io. All rights reserved.