Interface JAXXBindingWriter<B extends JAXXBinding>
-
- All Known Implementing Classes:
AbstractJAXXBindingWriter,DefaultJAXXBindingWriter,SimpleJAXXObjectBindingWriter
public interface JAXXBindingWriter<B extends JAXXBinding>The contract of a writer ofJAXXBindingcreation code from aDataBinding. Created: 5 déc. 2009- Version:
- $Revision$ Mise a jour: $Date$ par : $Author$
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaccept(DataBinding binding)Test if a binding can be treated by the writer.Class<B>getType()booleanisUsed()Test if the writer was at least used once (says that the methodwrite(DataBinding, JavaFileGenerator, StringBuilder)was at least invoked once).voidreset()Reset internal states.voidwrite(DataBinding binding, JavaFileGenerator generator, StringBuilder buffer)Generate the creation code of the givenbindingand push it in the givenbuffer.
-
-
-
Method Detail
-
accept
boolean accept(DataBinding binding)
Test if a binding can be treated by the writer.- Parameters:
binding- the binding to test- Returns:
trueif this writer can be used to generate binding creation code,falseotherwise.
-
isUsed
boolean isUsed()
Test if the writer was at least used once (says that the methodwrite(DataBinding, JavaFileGenerator, StringBuilder)was at least invoked once).- Returns:
trueif this writer was used
-
getType
Class<B> getType()
- Returns:
- the type of
JAXXBindingto generate
-
write
void write(DataBinding binding, JavaFileGenerator generator, StringBuilder buffer)
Generate the creation code of the givenbindingand push it in the givenbuffer. Note: after beean in this method, theisUsed()should always returntrue.- Parameters:
binding- the binding to usegenerator- common generator to build creation codebuffer- where to push creation code
-
reset
void reset()
Reset internal states. At the moment, there is only theusedproperty which is internal and must be reset tofalsefor each compiler in order to know if a type of writer is used for the file.- Since:
- 2.4
-
-