jaxx.compiler.binding
Class DataBinding

java.lang.Object
  extended by jaxx.compiler.binding.DataBinding

public class DataBinding
extends java.lang.Object

Represents a data binding in a JAXX file. DataBinding uses DataSource to track changes to a source expression and update the destination.


Field Summary
protected static org.apache.commons.logging.Log log
          Logger
 
Constructor Summary
DataBinding(java.lang.String source, java.lang.String id, java.lang.String assignment)
          Creates a new data binding.
 
Method Summary
 boolean compile(JAXXCompiler compiler, boolean quickNoDependencies)
          Compiles the data binding expression.
 java.lang.String getId()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
Logger

Constructor Detail

DataBinding

public DataBinding(java.lang.String source,
                   java.lang.String id,
                   java.lang.String assignment)
Creates a new data binding.

Parameters:
source - the Java source code for the data binding expression
id - the data binding destination in the form id.propertyName
assignment - Java snippet which will cause the destination property to be updated with the current value of the binding
Method Detail

getId

public java.lang.String getId()

compile

public boolean compile(JAXXCompiler compiler,
                       boolean quickNoDependencies)
                throws CompilerException
Compiles the data binding expression. This method calls methods in JAXXCompiler to add the Java code that performs the data binding setup.

Parameters:
compiler - compiler which includes the data binding
quickNoDependencies - true to optimize bindings with no dependencies by simply running them at startup time
Returns:
true if the expression has dependencies, false otherwise
Throws:
CompilerException - if a compilation error occurs


Copyright © 2008-2009 CodeLutin. All Rights Reserved.