Interface JAXXBindingWriter<B extends JAXXBinding>

All Known Implementing Classes:
AbstractJAXXBindingWriter, DefaultJAXXBindingWriter, SimpleJAXXObjectBindingWriter

public interface JAXXBindingWriter<B extends JAXXBinding>
The contract of a writer of JAXXBinding creation code from a DataBinding. Created: 5 déc. 2009
Version:
$Revision$ Mise a jour: $Date$ par : $Author$
Author:
Tony Chemit - chemit@codelutin.com
  • Method Details

    • accept

      boolean accept​(DataBinding binding)
      Test if a binding can be treated by the writer.
      Parameters:
      binding - the binding to test
      Returns:
      true if this writer can be used to generate binding creation code, false otherwise.
    • isUsed

      boolean isUsed()
      Test if the writer was at least used once (says that the method write(DataBinding, JavaFileGenerator, StringBuilder) was at least invoked once).
      Returns:
      true if this writer was used
    • getType

      java.lang.Class<B> getType()
      Returns:
      the type of JAXXBinding to generate
    • write

      void write​(DataBinding binding, JavaFileGenerator generator, java.lang.StringBuilder buffer)
      Generate the creation code of the given binding and push it in the given buffer. Note: after beean in this method, the isUsed() should always return true.
      Parameters:
      binding - the binding to use
      generator - common generator to build creation code
      buffer - where to push creation code
    • reset

      void reset()
      Reset internal states. At the moment, there is only the used property which is internal and must be reset to false for each compiler in order to know if a type of writer is used for the file.
      Since:
      2.4