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 ModelWriter
source
- the sourcepublic ModelWriter writePackage(JavaPackage pckg)
writePackage
in interface ModelWriter
pckg
- the packagepublic ModelWriter writeClass(JavaClass cls)
writeClass
in interface ModelWriter
cls
- the classpublic ModelWriter writeInitializer(JavaInitializer init)
writeInitializer
in interface ModelWriter
init
- the initializerpublic ModelWriter writeField(JavaField field)
writeField
in interface ModelWriter
field
- the fieldpublic ModelWriter writeConstructor(JavaConstructor constructor)
writeConstructor
in interface ModelWriter
constructor
- the constructorpublic ModelWriter writeMethod(JavaMethod method)
writeMethod
in interface ModelWriter
method
- the methodpublic ModelWriter writeAnnotation(JavaAnnotation annotation)
writeAnnotation
in interface ModelWriter
annotation
- the annotationpublic ModelWriter writeParameter(JavaParameter parameter)
writeParameter
in interface ModelWriter
parameter
- the parameterprotected void commentHeader(JavaAnnotatedElement entity)
Copyright © 2002–2014. All rights reserved.