com.sun.tools.doclets.internal.toolkit.builders
Class ConstructorBuilder

java.lang.Object
  extended by com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder
      extended by com.sun.tools.doclets.internal.toolkit.builders.AbstractMemberBuilder
          extended by com.sun.tools.doclets.internal.toolkit.builders.ConstructorBuilder

public class ConstructorBuilder
extends AbstractMemberBuilder

Builds documentation for a constructor. This code is not part of an API. It is implementation that is subject to change. Do not use it as an API

Since:
1.5

Field Summary
private  ClassDoc classDoc
          The class whose constructors are being documented.
private  java.util.List<ProgramElementDoc> constructors
          The constructors being documented.
private  int currentMethodIndex
          The index of the current field that is being documented at this point in time.
static java.lang.String NAME
          The name of this builder.
private  VisibleMemberMap visibleMemberMap
          The visible constructors for the given class.
private  ConstructorWriter writer
          The writer to output the constructor documentation.
 
Fields inherited from class com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder
configuration, containingPackagesSeen, DEBUG
 
Constructor Summary
private ConstructorBuilder(Configuration configuration)
          Construct a new ConstructorBuilder.
 
Method Summary
 void buildConstructorComments()
          Build the comments for the constructor.
 void buildConstructorDoc(java.util.List<?> elements)
          Build the constructor documentation.
 void buildConstructorFooter()
          Build the footer for the individual constructor.
 void buildConstructorHeader()
          Build the header for the individual constructor.
 void buildDeprecationInfo()
          Build the deprecation information.
 void buildFooter()
          Build the overall footer.
 void buildHeader()
          Build the overall header.
 void buildSignature()
          Build the signature.
 void buildTagInfo()
          Build the tag information.
static ConstructorBuilder getInstance(Configuration configuration, ClassDoc classDoc, ConstructorWriter writer)
          Construct a new ConstructorBuilder.
 java.lang.String getName()
          Return the name of this builder.
 ConstructorWriter getWriter()
          Return the constructor writer for this builder.
 boolean hasMembersToDocument()
          Return true if this subbuilder has anything to document.
 void invokeMethod(java.lang.String methodName, java.lang.Class<?>[] paramClasses, java.lang.Object[] params)
          Given the name and parameters, invoke the method in the builder.
 java.util.List<ProgramElementDoc> members(ClassDoc classDoc)
          Returns a list of constructors that will be documented for the given class.
 
Methods inherited from class com.sun.tools.doclets.internal.toolkit.builders.AbstractMemberBuilder
build, build
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
The name of this builder.

See Also:
Constant Field Values

currentMethodIndex

private int currentMethodIndex
The index of the current field that is being documented at this point in time.


classDoc

private ClassDoc classDoc
The class whose constructors are being documented.


visibleMemberMap

private VisibleMemberMap visibleMemberMap
The visible constructors for the given class.


writer

private ConstructorWriter writer
The writer to output the constructor documentation.


constructors

private java.util.List<ProgramElementDoc> constructors
The constructors being documented.

Constructor Detail

ConstructorBuilder

private ConstructorBuilder(Configuration configuration)
Construct a new ConstructorBuilder.

Parameters:
configuration - the current configuration of the doclet.
Method Detail

getInstance

public static ConstructorBuilder getInstance(Configuration configuration,
                                             ClassDoc classDoc,
                                             ConstructorWriter writer)
Construct a new ConstructorBuilder.

Parameters:
configuration - the current configuration of the doclet.
classDoc - the class whoses members are being documented.
writer - the doclet specific writer.

getName

public java.lang.String getName()
Return the name of this builder.

Specified by:
getName in class AbstractBuilder
Returns:
the name of the builder.

hasMembersToDocument

public boolean hasMembersToDocument()
Return true if this subbuilder has anything to document.

Specified by:
hasMembersToDocument in class AbstractMemberBuilder
Returns:
true if this subbuilder has anything to document.

invokeMethod

public void invokeMethod(java.lang.String methodName,
                         java.lang.Class<?>[] paramClasses,
                         java.lang.Object[] params)
                  throws java.lang.Exception
Given the name and parameters, invoke the method in the builder. This method is required to invoke the appropriate build method as instructed by the builder XML file.

Specified by:
invokeMethod in class AbstractBuilder
Parameters:
methodName - the name of the method that we would like to invoke.
paramClasses - the types for each parameter.
params - the parameters of the method.
Throws:
java.lang.Exception

members

public java.util.List<ProgramElementDoc> members(ClassDoc classDoc)
Returns a list of constructors that will be documented for the given class. This information can be used for doclet specific documentation generation.

Returns:
a list of constructors that will be documented.

getWriter

public ConstructorWriter getWriter()
Return the constructor writer for this builder.

Returns:
the constructor writer for this builder.

buildConstructorDoc

public void buildConstructorDoc(java.util.List<?> elements)
Build the constructor documentation.

Parameters:
elements - the XML elements that specify how to construct this documentation.

buildHeader

public void buildHeader()
Build the overall header.


buildConstructorHeader

public void buildConstructorHeader()
Build the header for the individual constructor.


buildSignature

public void buildSignature()
Build the signature.


buildDeprecationInfo

public void buildDeprecationInfo()
Build the deprecation information.


buildConstructorComments

public void buildConstructorComments()
Build the comments for the constructor. Do nothing if Configuration.nocomment is set to true.


buildTagInfo

public void buildTagInfo()
Build the tag information.


buildConstructorFooter

public void buildConstructorFooter()
Build the footer for the individual constructor.


buildFooter

public void buildFooter()
Build the overall footer.