jaxx.compiler
Class DataBinding

java.lang.Object
  extended by jaxx.compiler.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.


Constructor Summary
DataBinding(java.lang.String source, java.lang.String dest, java.lang.String assignment, JAXXCompiler compiler)
          Creates a new data binding.
 
Method Summary
 boolean compile(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
 

Constructor Detail

DataBinding

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

Parameters:
source - the Java source code for the data binding expression
dest - 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
compiler - the current JAXXCompiler
Method Detail

getId

public java.lang.String getId()

compile

public boolean compile(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:
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.