Package com.thoughtworks.qdox.writer
Interface ModelWriter
- All Known Implementing Classes:
DefaultModelWriter
public interface ModelWriter
Interface for a custom ModelWriter.
QDox doesn't keep any formatting information of the original source file (if it's there).
With a ModelWriter you can specify the way elements look if you write them to any output.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionWrite 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 methodsWrite the java constructor.writeField
(JavaField fld) Write the java field A standard field writer should write: the javadoc the annotations the field signatureWrite the initializer.writeMethod
(JavaMethod mth) 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 useswritePackage
(JavaPackage pkg) Write the java package A standard package writer should write: the javadoc the annotations the package signatureWrite the java parameter A standard parameter writer should write: the javadoc the annotations the parameter signaturewriteSource
(JavaSource src) Write the complete source file A standard source writer should write: the package the imports the classes
-
Method Details
-
writeSource
Write the complete source file A standard source writer should write:- the package
- the imports
- the classes
- Parameters:
src
- the source- Returns:
- itself
-
writePackage
Write the java package A standard package writer should write:- the javadoc
- the annotations
- the package signature
- Parameters:
pkg
- 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
- Parameters:
cls
- the class- Returns:
- itself
-
writeField
Write the java field A standard field writer should write:- the javadoc
- the annotations
- the field signature
- Parameters:
fld
- the field- Returns:
- itself
-
writeAnnotation
Write the java annotation A standard annotation writer should write:- the annotation signature
- Parameters:
ann
- the annotation- Returns:
- itself
-
writeMethod
Write the java method A standard method writer should write:- the javadoc
- the annotations
- the method signature, containing:
- the parameters
- Parameters:
mth
- the method- Returns:
- itself
-
writeParameter
Write the java parameter A standard parameter writer should write:- the javadoc
- the annotations
- the parameter signature
- Parameters:
prm
- the parameter- Returns:
- itself
-
writeConstructor
Write the java constructor. A standard constructor writer should write:- the javadoc
- the annotations
- the constructor signature, containing:
- the parameters
- Parameters:
cns
- the constructor- Returns:
- itself
-
writeInitializer
Write the initializer.- Parameters:
init
- the initializer- Returns:
- itself
-
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
- Parameters:
descriptor
- the module declaration- Returns:
- itself
-
writeModuleExports
Write the module descriptors exports- Parameters:
exports
- the exports module statement- Returns:
- itself
-
writeModuleOpens
Write the module descriptors opens- Parameters:
opens
- the opens module statement- Returns:
- itself
-
writeModuleProvides
Write the module descriptors provides- Parameters:
provides
- the provides module statement- Returns:
- itself
-
writeModuleRequires
Write the module descriptors requires- Parameters:
requires
- the requires module statement- Returns:
- itself
-
writeModuleUses
Write the module descriptors uses- Parameters:
uses
- the uses module statement- Returns:
- itself
-