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 voidcommentHeader(JavaAnnotatedElement entity) protected final IndentBufferAll information is written to this buffer.toString()private voidwriteAccessibilityModifier(Collection<String> modifiers) private voidwriteAllModifiers(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 ModelWriterwriteClassBody(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 voidwriteNonAccessibilityModifiers(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:
writeSourcein 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:
writePackagein 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:
writeClassin interfaceModelWriter- Parameters:
cls- the class- Returns:
- itself
-
writeClassBody
-
writeInitializer
Write the initializer.- Specified by:
writeInitializerin 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:
writeFieldin 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:
writeConstructorin 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:
writeMethodin 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:
writeAnnotationin 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:
writeParameterin 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:
writeModuleDescriptorin interfaceModelWriter- Parameters:
descriptor- the module declaration- Returns:
- itself
-
writeModuleExports
Write the module descriptors exports- Specified by:
writeModuleExportsin interfaceModelWriter- Parameters:
exports- the exports module statement- Returns:
- itself
-
writeModuleOpens
Write the module descriptors opens- Specified by:
writeModuleOpensin interfaceModelWriter- Parameters:
opens- the opens module statement- Returns:
- itself
-
writeModuleProvides
Write the module descriptors provides- Specified by:
writeModuleProvidesin interfaceModelWriter- Parameters:
provides- the provides module statement- Returns:
- itself
-
writeModuleRequires
Write the module descriptors requires- Specified by:
writeModuleRequiresin interfaceModelWriter- Parameters:
requires- the requires module statement- Returns:
- itself
-
writeModuleUses
Write the module descriptors uses- Specified by:
writeModuleUsesin interfaceModelWriter- Parameters:
uses- the uses module statement- Returns:
- itself
-
toString
-