public class DefaultModelWriter extends Object implements ModelWriter
| Constructor and Description |
|---|
DefaultModelWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
commentHeader(JavaAnnotatedElement entity) |
protected IndentBuffer |
getBuffer()
All information is written to this buffer.
|
String |
toString() |
ModelWriter |
writeAnnotation(JavaAnnotation annotation)
Write the java annotation
A standard annotation writer should write:
the annotation signature
|
ModelWriter |
writeClass(JavaClass cls)
Write the java class
A standard class writer should write:
the javadoc
the annotations
the class signature, containing:
the fields
the constructors
the methods
|
ModelWriter |
writeConstructor(JavaConstructor constructor)
Write the java constructor.
|
ModelWriter |
writeField(JavaField field)
Write the java field
A standard field writer should write:
the javadoc
the annotations
the field signature
|
ModelWriter |
writeInitializer(JavaInitializer init)
Write the initializer.
|
ModelWriter |
writeMethod(JavaMethod method)
Write the java method
A standard method writer should write:
the javadoc
the annotations
the method signature, containing:
the parameters
|
ModelWriter |
writePackage(JavaPackage pckg)
Write the java package
A standard package writer should write:
the javadoc
the annotations
the package signature
|
ModelWriter |
writeParameter(JavaParameter parameter)
Write the java parameter
A standard parameter writer should write:
the javadoc
the annotations
the parameter signature
|
ModelWriter |
writeSource(JavaSource source)
Write the complete source file
A standard source writer should write:
the package
the imports
the classes
|
protected final IndentBuffer getBuffer()
public ModelWriter writeSource(JavaSource source)
writeSource in interface ModelWritersource - the sourcepublic ModelWriter writePackage(JavaPackage pckg)
writePackage in interface ModelWriterpckg - the packagepublic ModelWriter writeClass(JavaClass cls)
writeClass in interface ModelWritercls - the classpublic ModelWriter writeInitializer(JavaInitializer init)
writeInitializer in interface ModelWriterinit - the initializerpublic ModelWriter writeField(JavaField field)
writeField in interface ModelWriterfield - the fieldpublic ModelWriter writeConstructor(JavaConstructor constructor)
writeConstructor in interface ModelWriterconstructor - the constructorpublic ModelWriter writeMethod(JavaMethod method)
writeMethod in interface ModelWritermethod - the methodpublic ModelWriter writeAnnotation(JavaAnnotation annotation)
writeAnnotation in interface ModelWriterannotation - the annotationpublic ModelWriter writeParameter(JavaParameter parameter)
writeParameter in interface ModelWriterparameter - the parameterprotected void commentHeader(JavaAnnotatedElement entity)
Copyright © 2002–2016. All rights reserved.