Class DefaultModelWriter
java.lang.Object
com.thoughtworks.qdox.writer.impl.DefaultModelWriter
- All Implemented Interfaces:
ModelWriter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
commentHeader
(JavaAnnotatedElement entity) protected final IndentBuffer
All information is written to this buffer.toString()
private void
writeAccessibilityModifier
(Collection<String> modifiers) private void
writeAllModifiers
(List<String> modifiers) writeAnnotation
(JavaAnnotation annotation) Write the java annotation A standard annotation writer should write: the annotation signaturewriteClass
(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 methodsprivate ModelWriter
writeClassBody
(JavaClass cls) writeConstructor
(JavaConstructor constructor) Write the java constructor.writeField
(JavaField field) Write the java field A standard field writer should write: the javadoc the annotations the field signatureWrite the initializer.writeMethod
(JavaMethod method) Write the java method A standard method writer should write: the javadoc the annotations the method signature, containing: the parameterswriteModuleDescriptor
(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 statementsWrite the module descriptors exportsWrite the module descriptors opensWrite the module descriptors providesWrite the module descriptors requiresWrite the module descriptors usesprivate void
writeNonAccessibilityModifiers
(Collection<String> modifiers) writePackage
(JavaPackage pckg) Write the java package A standard package writer should write: the javadoc the annotations the package signaturewriteParameter
(JavaParameter parameter) Write the java parameter A standard parameter writer should write: the javadoc the annotations the parameter signaturewriteSource
(JavaSource source) Write the complete source file A standard source writer should write: the package the imports the classes
-
Field Details
-
buffer
-
-
Constructor Details
-
DefaultModelWriter
public DefaultModelWriter()
-
-
Method Details
-
getBuffer
All information is written to this buffer. When extending this class you should write to this buffer- Returns:
- the buffer
-
writeSource
Write the complete source file A standard source writer should write:- the package
- the imports
- the classes
- Specified by:
writeSource
in interfaceModelWriter
- Parameters:
source
- the source- Returns:
- itself
-
writePackage
Write the java package A standard package writer should write:- the javadoc
- the annotations
- the package signature
- Specified by:
writePackage
in interfaceModelWriter
- Parameters:
pckg
- the package- Returns:
- itself
-
writeClass
Write the java class A standard class writer should write:- the javadoc
- the annotations
- the class signature, containing:
- the fields
- the constructors
- the methods
- Specified by:
writeClass
in interfaceModelWriter
- Parameters:
cls
- the class- Returns:
- itself
-
writeClassBody
-
writeInitializer
Write the initializer.- Specified by:
writeInitializer
in interfaceModelWriter
- Parameters:
init
- the initializer- Returns:
- itself
-
writeField
Write the java field A standard field writer should write:- the javadoc
- the annotations
- the field signature
- Specified by:
writeField
in interfaceModelWriter
- Parameters:
field
- the field- Returns:
- itself
-
writeConstructor
Write the java constructor. A standard constructor writer should write:- the javadoc
- the annotations
- the constructor signature, containing:
- the parameters
- Specified by:
writeConstructor
in interfaceModelWriter
- Parameters:
constructor
- the constructor- Returns:
- itself
-
writeMethod
Write the java method A standard method writer should write:- the javadoc
- the annotations
- the method signature, containing:
- the parameters
- Specified by:
writeMethod
in interfaceModelWriter
- Parameters:
method
- the method- Returns:
- itself
-
writeNonAccessibilityModifiers
-
writeAccessibilityModifier
-
writeAllModifiers
-
writeAnnotation
Write the java annotation A standard annotation writer should write:- the annotation signature
- Specified by:
writeAnnotation
in interfaceModelWriter
- Parameters:
annotation
- the annotation- Returns:
- itself
-
writeParameter
Write the java parameter A standard parameter writer should write:- the javadoc
- the annotations
- the parameter signature
- Specified by:
writeParameter
in interfaceModelWriter
- Parameters:
parameter
- the parameter- Returns:
- itself
-
commentHeader
-
writeModuleDescriptor
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
- Specified by:
writeModuleDescriptor
in interfaceModelWriter
- Parameters:
descriptor
- the module declaration- Returns:
- itself
-
writeModuleExports
Write the module descriptors exports- Specified by:
writeModuleExports
in interfaceModelWriter
- Parameters:
exports
- the exports module statement- Returns:
- itself
-
writeModuleOpens
Write the module descriptors opens- Specified by:
writeModuleOpens
in interfaceModelWriter
- Parameters:
opens
- the opens module statement- Returns:
- itself
-
writeModuleProvides
Write the module descriptors provides- Specified by:
writeModuleProvides
in interfaceModelWriter
- Parameters:
provides
- the provides module statement- Returns:
- itself
-
writeModuleRequires
Write the module descriptors requires- Specified by:
writeModuleRequires
in interfaceModelWriter
- Parameters:
requires
- the requires module statement- Returns:
- itself
-
writeModuleUses
Write the module descriptors uses- Specified by:
writeModuleUses
in interfaceModelWriter
- Parameters:
uses
- the uses module statement- Returns:
- itself
-
toString
-