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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ModelWriter
writeAnnotation(JavaAnnotation ann)
Write the java annotation A standard annotation writer should write: the annotation signatureModelWriter
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 methodsModelWriter
writeConstructor(JavaConstructor cns)
Write the java constructor.ModelWriter
writeField(JavaField fld)
Write the java field A standard field writer should write: the javadoc the annotations the field signatureModelWriter
writeInitializer(JavaInitializer init)
Write the initializer.ModelWriter
writeMethod(JavaMethod mth)
Write the java method A standard method writer should write: the javadoc the annotations the method signature, containing: the parametersModelWriter
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 statementsModelWriter
writeModuleExports(JavaModuleDescriptor.JavaExports exports)
Write the module descriptors exportsModelWriter
writeModuleOpens(JavaModuleDescriptor.JavaOpens opens)
Write the module descriptors opensModelWriter
writeModuleProvides(JavaModuleDescriptor.JavaProvides provides)
Write the module descriptors providesModelWriter
writeModuleRequires(JavaModuleDescriptor.JavaRequires requires)
Write the module descriptors requiresModelWriter
writeModuleUses(JavaModuleDescriptor.JavaUses uses)
Write the module descriptors usesModelWriter
writePackage(JavaPackage pkg)
Write the java package A standard package writer should write: the javadoc the annotations the package signatureModelWriter
writeParameter(JavaParameter prm)
Write the java parameter A standard parameter writer should write: the javadoc the annotations the parameter signatureModelWriter
writeSource(JavaSource src)
Write the complete source file A standard source writer should write: the package the imports the classes
-
-
-
Method Detail
-
writeSource
ModelWriter writeSource(JavaSource src)
Write the complete source file A standard source writer should write:- the package
- the imports
- the classes
- Parameters:
src
- the source- Returns:
- itself
-
writePackage
ModelWriter writePackage(JavaPackage pkg)
Write the java package A standard package writer should write:- the javadoc
- the annotations
- the package signature
- Parameters:
pkg
- the package- Returns:
- itself
-
writeClass
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
- Parameters:
cls
- the class- Returns:
- itself
-
writeField
ModelWriter writeField(JavaField fld)
Write the java field A standard field writer should write:- the javadoc
- the annotations
- the field signature
- Parameters:
fld
- the field- Returns:
- itself
-
writeAnnotation
ModelWriter writeAnnotation(JavaAnnotation ann)
Write the java annotation A standard annotation writer should write:- the annotation signature
- Parameters:
ann
- the annotation- Returns:
- itself
-
writeMethod
ModelWriter writeMethod(JavaMethod mth)
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
ModelWriter writeParameter(JavaParameter prm)
Write the java parameter A standard parameter writer should write:- the javadoc
- the annotations
- the parameter signature
- Parameters:
prm
- the parameter- Returns:
- itself
-
writeConstructor
ModelWriter writeConstructor(JavaConstructor cns)
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
ModelWriter writeInitializer(JavaInitializer init)
Write the initializer.- Parameters:
init
- the initializer- Returns:
- itself
-
writeModuleDescriptor
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
- Parameters:
descriptor
- the module declaration- Returns:
- itself
-
writeModuleExports
ModelWriter writeModuleExports(JavaModuleDescriptor.JavaExports exports)
Write the module descriptors exports- Parameters:
exports
- the exports module statement- Returns:
- itself
-
writeModuleOpens
ModelWriter writeModuleOpens(JavaModuleDescriptor.JavaOpens opens)
Write the module descriptors opens- Parameters:
opens
- the opens module statement- Returns:
- itself
-
writeModuleProvides
ModelWriter writeModuleProvides(JavaModuleDescriptor.JavaProvides provides)
Write the module descriptors provides- Parameters:
provides
- the provides module statement- Returns:
- itself
-
writeModuleRequires
ModelWriter writeModuleRequires(JavaModuleDescriptor.JavaRequires requires)
Write the module descriptors requires- Parameters:
requires
- the requires module statement- Returns:
- itself
-
writeModuleUses
ModelWriter writeModuleUses(JavaModuleDescriptor.JavaUses uses)
Write the module descriptors uses- Parameters:
uses
- the uses module statement- Returns:
- itself
-
-