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

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

public class MemberSummaryBuilder
extends AbstractMemberBuilder

Builds the member summary. 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 type being documented.
private  MemberSummaryWriter[] memberSummaryWriters
          The member summary writers for the given class.
static java.lang.String NAME
          The XML root for this builder.
private  VisibleMemberMap[] visibleMemberMaps
          The visible members for the given class.
 
Fields inherited from class com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder
configuration, containingPackagesSeen, DEBUG
 
Constructor Summary
private MemberSummaryBuilder(Configuration configuration)
           
 
Method Summary
 void buildAnnotationTypeOptionalMemberSummary()
          Build the summary for the optional members.
 void buildAnnotationTypeRequiredMemberSummary()
          Build the summary for the optional members.
 void buildConstructorsSummary()
          Build the constructor summary.
 void buildEnumConstantsSummary()
          Build the summary for the enum constants.
 void buildFieldsInheritedSummary()
          Build the inherited summary for the fields.
 void buildFieldsSummary()
          Build the summary for the fields.
private  void buildInheritedSummary(MemberSummaryWriter writer, VisibleMemberMap visibleMemberMap)
          Build the inherited member summary for the given methods.
 void buildMethodsInheritedSummary()
          Build the inherited method summary.
 void buildMethodsSummary()
          Build the method summary.
 void buildNestedClassesInheritedSummary()
          Build the inherited summary for the nested classes.
 void buildNestedClassesSummary()
          Build the summary for the nested classes.
private  void buildSummary(MemberSummaryWriter writer, VisibleMemberMap visibleMemberMap)
          Build the member summary for the given members.
static MemberSummaryBuilder getInstance(AnnotationTypeWriter annotationTypeWriter, Configuration configuration)
          Construct a new MemberSummaryBuilder.
static MemberSummaryBuilder getInstance(ClassWriter classWriter, Configuration configuration)
          Construct a new MemberSummaryBuilder.
 MemberSummaryWriter getMemberSummaryWriter(int type)
          Return the specified member summary writer.
 java.lang.String getName()
          Return the name of this builder.
 VisibleMemberMap getVisibleMemberMap(int type)
          Return the specified visible member map.
 boolean hasMembersToDocument()
          Return true it there are any members to summarize.
private  void init(java.lang.Object writer)
           
 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(int type)
          Returns a list of methods 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 XML root for this builder.

See Also:
Constant Field Values

visibleMemberMaps

private VisibleMemberMap[] visibleMemberMaps
The visible members for the given class.


memberSummaryWriters

private MemberSummaryWriter[] memberSummaryWriters
The member summary writers for the given class.


classDoc

private ClassDoc classDoc
The type being documented.

Constructor Detail

MemberSummaryBuilder

private MemberSummaryBuilder(Configuration configuration)
Method Detail

getInstance

public static MemberSummaryBuilder getInstance(ClassWriter classWriter,
                                               Configuration configuration)
                                        throws java.lang.Exception
Construct a new MemberSummaryBuilder.

Parameters:
classWriter - the writer for the class whose members are being summarized.
configuration - the current configuration of the doclet.
Throws:
java.lang.Exception

getInstance

public static MemberSummaryBuilder getInstance(AnnotationTypeWriter annotationTypeWriter,
                                               Configuration configuration)
                                        throws java.lang.Exception
Construct a new MemberSummaryBuilder.

Parameters:
annotationTypeWriter - the writer for the class whose members are being summarized.
configuration - the current configuration of the doclet.
Throws:
java.lang.Exception

init

private void init(java.lang.Object writer)
           throws java.lang.Exception
Throws:
java.lang.Exception

getName

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

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

getVisibleMemberMap

public VisibleMemberMap getVisibleMemberMap(int type)
Return the specified visible member map.

Parameters:
type - the type of visible member map to return.
Returns:
the specified visible member map.
Throws:
java.lang.ArrayIndexOutOfBoundsException - when the type is invalid.
See Also:
VisibleMemberMap

getMemberSummaryWriter

public MemberSummaryWriter getMemberSummaryWriter(int type)
Return the specified member summary writer.

Parameters:
type - the type of member summary writer to return.
Returns:
the specified member summary writer.
Throws:
java.lang.ArrayIndexOutOfBoundsException - when the type is invalid.
See Also:
VisibleMemberMap

members

public java.util.List<ProgramElementDoc> members(int type)
Returns a list of methods 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.
type - the type of members to return.
Returns:
a list of methods that will be documented.
See Also:
VisibleMemberMap

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

hasMembersToDocument

public boolean hasMembersToDocument()
Return true it there are any members to summarize.

Specified by:
hasMembersToDocument in class AbstractMemberBuilder
Returns:
true if there are any members to summarize.

buildEnumConstantsSummary

public void buildEnumConstantsSummary()
Build the summary for the enum constants.


buildAnnotationTypeOptionalMemberSummary

public void buildAnnotationTypeOptionalMemberSummary()
Build the summary for the optional members.


buildAnnotationTypeRequiredMemberSummary

public void buildAnnotationTypeRequiredMemberSummary()
Build the summary for the optional members.


buildFieldsSummary

public void buildFieldsSummary()
Build the summary for the fields.


buildFieldsInheritedSummary

public void buildFieldsInheritedSummary()
Build the inherited summary for the fields.


buildNestedClassesSummary

public void buildNestedClassesSummary()
Build the summary for the nested classes.


buildNestedClassesInheritedSummary

public void buildNestedClassesInheritedSummary()
Build the inherited summary for the nested classes.


buildMethodsSummary

public void buildMethodsSummary()
Build the method summary.


buildMethodsInheritedSummary

public void buildMethodsInheritedSummary()
Build the inherited method summary.


buildConstructorsSummary

public void buildConstructorsSummary()
Build the constructor summary.


buildSummary

private void buildSummary(MemberSummaryWriter writer,
                          VisibleMemberMap visibleMemberMap)
Build the member summary for the given members.

Parameters:
writer - the summary writer to write the output.
visibleMemberMap - the given members to summarize.

buildInheritedSummary

private void buildInheritedSummary(MemberSummaryWriter writer,
                                   VisibleMemberMap visibleMemberMap)
Build the inherited member summary for the given methods.

Parameters:
writer - the writer for this member summary.
visibleMemberMap - the map for the members to document.