Package com.thoughtworks.qdox.model
Class ModelBuilder
- java.lang.Object
-
- com.thoughtworks.qdox.model.ModelBuilder
-
- All Implemented Interfaces:
Builder
public class ModelBuilder extends java.lang.Object implements Builder
- Author:
- Joe Walnes, Robert Scholte
-
-
Constructor Summary
Constructors Constructor Description ModelBuilder()
ModelBuilder(JavaClassContext context, DocletTagFactory docletTagFactory, java.util.Map allPackages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAnnotation(Annotation annotation)
void
addField(FieldDef def)
void
addImport(java.lang.String importName)
void
addJavaDoc(java.lang.String text)
void
addJavaDocTag(TagDef tagDef)
void
addMethod(MethodDef def)
void
addPackage(PackageDef packageDef)
void
addParameter(FieldDef fieldDef)
void
beginClass(ClassDef def)
void
beginMethod()
Type
createType(TypeDef typeDef)
Type
createType(TypeDef typeDef, int dimensions)
this one is specific for those cases where dimensions can be part of both the type and identifier i.e.Type
createType(java.lang.String typeName, int dimensions)
TypeVariable
createTypeVariable(TypeVariableDef typeVariableDef)
TypeVariable
createTypeVariable(java.lang.String name, java.util.List typeParams)
void
endClass()
void
endMethod(MethodDef def)
JavaSource
getSource()
-
-
-
Constructor Detail
-
ModelBuilder
public ModelBuilder()
-
ModelBuilder
public ModelBuilder(JavaClassContext context, DocletTagFactory docletTagFactory, java.util.Map allPackages)
-
-
Method Detail
-
addPackage
public void addPackage(PackageDef packageDef)
- Specified by:
addPackage
in interfaceBuilder
-
addImport
public void addImport(java.lang.String importName)
-
addJavaDoc
public void addJavaDoc(java.lang.String text)
- Specified by:
addJavaDoc
in interfaceBuilder
-
addJavaDocTag
public void addJavaDocTag(TagDef tagDef)
- Specified by:
addJavaDocTag
in interfaceBuilder
-
beginClass
public void beginClass(ClassDef def)
- Specified by:
beginClass
in interfaceBuilder
-
createType
public Type createType(java.lang.String typeName, int dimensions)
- Specified by:
createType
in interfaceBuilder
-
createType
public Type createType(TypeDef typeDef)
- Specified by:
createType
in interfaceBuilder
-
createType
public Type createType(TypeDef typeDef, int dimensions)
this one is specific for those cases where dimensions can be part of both the type and identifier i.e. private String[] matrix[]; //field public abstract String[] getMatrix[](); //method- Parameters:
typeDef
-dimensions
-- Returns:
- the Type
-
addMethod
public void addMethod(MethodDef def)
-
beginMethod
public void beginMethod()
- Specified by:
beginMethod
in interfaceBuilder
-
createTypeVariable
public TypeVariable createTypeVariable(TypeVariableDef typeVariableDef)
-
createTypeVariable
public TypeVariable createTypeVariable(java.lang.String name, java.util.List typeParams)
-
addParameter
public void addParameter(FieldDef fieldDef)
- Specified by:
addParameter
in interfaceBuilder
-
addAnnotation
public void addAnnotation(Annotation annotation)
- Specified by:
addAnnotation
in interfaceBuilder
-
getSource
public JavaSource getSource()
-
-