public class DefaultModelWriter extends java.lang.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.
|
java.lang.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 |
writeModuleDescriptor(JavaModuleDescriptor descriptor)
Write the module descriptor
A standard module descriptor writer should write:
the javadoc
the annotations
the module signature, containing:
the requires statements
the exports statements
the opens statements
the uses statements
the provides statements
|
ModelWriter |
writeModuleExports(JavaModuleDescriptor.JavaExports exports)
Write the module descriptors exports
|
ModelWriter |
writeModuleOpens(JavaModuleDescriptor.JavaOpens opens)
Write the module descriptors opens
|
ModelWriter |
writeModuleProvides(JavaModuleDescriptor.JavaProvides provides)
Write the module descriptors provides
|
ModelWriter |
writeModuleRequires(JavaModuleDescriptor.JavaRequires requires)
Write the module descriptors requires
|
ModelWriter |
writeModuleUses(JavaModuleDescriptor.JavaUses uses)
Write the module descriptors uses
|
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)
public ModelWriter writeModuleDescriptor(JavaModuleDescriptor descriptor)
writeModuleDescriptor in interface ModelWriterdescriptor - the module declarationpublic ModelWriter writeModuleExports(JavaModuleDescriptor.JavaExports exports)
writeModuleExports in interface ModelWriterexports - the exports module statementpublic ModelWriter writeModuleOpens(JavaModuleDescriptor.JavaOpens opens)
writeModuleOpens in interface ModelWriteropens - the opens module statementpublic ModelWriter writeModuleProvides(JavaModuleDescriptor.JavaProvides provides)
writeModuleProvides in interface ModelWriterprovides - the provides module statementpublic ModelWriter writeModuleRequires(JavaModuleDescriptor.JavaRequires requires)
writeModuleRequires in interface ModelWriterrequires - the requires module statementpublic ModelWriter writeModuleUses(JavaModuleDescriptor.JavaUses uses)
writeModuleUses in interface ModelWriteruses - the uses module statementpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2002-2018. All Rights Reserved.