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

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.FieldBuilder

public class FieldBuilder
extends AbstractMemberBuilder

Builds documentation for a field. 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 fields are being documented.
private  int currentFieldIndex
          The index of the current field that is being documented at this point in time.
private  java.util.List<ProgramElementDoc> fields
          The list of fields being documented.
private  VisibleMemberMap visibleMemberMap
          The visible fields for the given class.
private  FieldWriter writer
          The writer to output the field documentation.
 
Fields inherited from class com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder
configuration, containingPackagesSeen, DEBUG
 
Constructor Summary
private FieldBuilder(Configuration configuration)
          Construct a new FieldBuilder.
 
Method Summary
 void buildDeprecationInfo()
          Build the deprecation information.
 void buildFieldComments()
          Build the comments for the field.
 void buildFieldDoc(java.util.List<?> elements)
          Build the field documentation.
 void buildFieldFooter()
          Build the footer for the individual field.
 void buildFieldHeader()
          Build the header for the individual field.
 void buildFooter()
          Build the overall footer.
 void buildHeader()
          Build the overall header.
 void buildSignature()
          Build the signature.
 void buildTagInfo()
          Build the tag information.
static FieldBuilder getInstance(Configuration configuration, ClassDoc classDoc, FieldWriter writer)
          Construct a new FieldBuilder.
 java.lang.String getName()
          Return the name of this builder.
 VisibleMemberMap getVisibleMemberMap()
          Returns the visible member map for the fields of this class.
 FieldWriter getWriter()
          Return the field writer for this builder.
 boolean hasMembersToDocument()
          summaryOrder.size()
 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 fields 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

classDoc

private ClassDoc classDoc
The class whose fields are being documented.


visibleMemberMap

private VisibleMemberMap visibleMemberMap
The visible fields for the given class.


writer

private FieldWriter writer
The writer to output the field documentation.


fields

private java.util.List<ProgramElementDoc> fields
The list of fields being documented.


currentFieldIndex

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

Constructor Detail

FieldBuilder

private FieldBuilder(Configuration configuration)
Construct a new FieldBuilder.

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

getInstance

public static FieldBuilder getInstance(Configuration configuration,
                                       ClassDoc classDoc,
                                       FieldWriter writer)
Construct a new FieldBuilder.

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.

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 fields that will be documented for the given class. This information can be used for doclet specific documentation generation.

Parameters:
classDoc - the ClassDoc we want to check.
Returns:
a list of fields that will be documented.

getVisibleMemberMap

public VisibleMemberMap getVisibleMemberMap()
Returns the visible member map for the fields of this class.

Returns:
the visible member map for the fields of this class.

hasMembersToDocument

public boolean hasMembersToDocument()
summaryOrder.size()

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

buildFieldDoc

public void buildFieldDoc(java.util.List<?> elements)
Build the field documentation.

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

buildHeader

public void buildHeader()
Build the overall header.


buildFieldHeader

public void buildFieldHeader()
Build the header for the individual field.


buildSignature

public void buildSignature()
Build the signature.


buildDeprecationInfo

public void buildDeprecationInfo()
Build the deprecation information.


buildFieldComments

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


buildTagInfo

public void buildTagInfo()
Build the tag information.


buildFieldFooter

public void buildFieldFooter()
Build the footer for the individual field.


buildFooter

public void buildFooter()
Build the overall footer.


getWriter

public FieldWriter getWriter()
Return the field writer for this builder.

Returns:
the field writer for this builder.