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

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

public class EnumConstantBuilder
extends AbstractMemberBuilder

Builds documentation for a enum constants. 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 enum constants are being documented.
private  int currentEnumConstantsIndex
          The index of the current enum constant that is being documented at this point in time.
private  java.util.List<ProgramElementDoc> enumConstants
          The list of enum constants being documented.
private  VisibleMemberMap visibleMemberMap
          The visible enum constantss for the given class.
private  EnumConstantWriter writer
          The writer to output the enum constants documentation.
 
Fields inherited from class com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder
configuration, containingPackagesSeen, DEBUG
 
Constructor Summary
private EnumConstantBuilder(Configuration configuration)
          Construct a new EnumConstantsBuilder.
 
Method Summary
 void buildDeprecationInfo()
          Build the deprecation information.
 void buildEnumConstant(java.util.List<?> elements)
          Build the enum constant documentation.
 void buildEnumConstantComments()
          Build the comments for the enum constant.
 void buildEnumConstantFooter()
          Build the footer for the individual enum constants.
 void buildEnumConstantHeader()
          Build the header for the individual enum constants.
 void buildFooter()
          Build the overall footer.
 void buildHeader()
          Build the overall header.
 void buildSignature()
          Build the signature.
 void buildTagInfo()
          Build the tag information.
static EnumConstantBuilder getInstance(Configuration configuration, ClassDoc classDoc, EnumConstantWriter writer)
          Construct a new EnumConstantsBuilder.
 java.lang.String getName()
          Return the name of this builder.
 VisibleMemberMap getVisibleMemberMap()
          Returns the visible member map for the enum constants of this class.
 EnumConstantWriter getWriter()
          Return the enum constant 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 enum constants 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 enum constants are being documented.


visibleMemberMap

private VisibleMemberMap visibleMemberMap
The visible enum constantss for the given class.


writer

private EnumConstantWriter writer
The writer to output the enum constants documentation.


enumConstants

private java.util.List<ProgramElementDoc> enumConstants
The list of enum constants being documented.


currentEnumConstantsIndex

private int currentEnumConstantsIndex
The index of the current enum constant that is being documented at this point in time.

Constructor Detail

EnumConstantBuilder

private EnumConstantBuilder(Configuration configuration)
Construct a new EnumConstantsBuilder.

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

getInstance

public static EnumConstantBuilder getInstance(Configuration configuration,
                                              ClassDoc classDoc,
                                              EnumConstantWriter writer)
Construct a new EnumConstantsBuilder.

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 enum constants 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 enum constants that will be documented.

getVisibleMemberMap

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

Returns:
the visible member map for the enum constants of this class.

hasMembersToDocument

public boolean hasMembersToDocument()
summaryOrder.size()

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

buildEnumConstant

public void buildEnumConstant(java.util.List<?> elements)
Build the enum constant documentation.

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

buildHeader

public void buildHeader()
Build the overall header.


buildEnumConstantHeader

public void buildEnumConstantHeader()
Build the header for the individual enum constants.


buildSignature

public void buildSignature()
Build the signature.


buildDeprecationInfo

public void buildDeprecationInfo()
Build the deprecation information.


buildEnumConstantComments

public void buildEnumConstantComments()
Build the comments for the enum constant. Do nothing if Configuration.nocomment is set to true.


buildTagInfo

public void buildTagInfo()
Build the tag information.


buildEnumConstantFooter

public void buildEnumConstantFooter()
Build the footer for the individual enum constants.


buildFooter

public void buildFooter()
Build the overall footer.


getWriter

public EnumConstantWriter getWriter()
Return the enum constant writer for this builder.

Returns:
the enum constant writer for this builder.