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

java.lang.Object
  extended by com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder
Direct Known Subclasses:
AbstractMemberBuilder, AnnotationTypeBuilder, ClassBuilder, ConstantsSummaryBuilder, PackageSummaryBuilder, SerializedFormBuilder

public abstract class AbstractBuilder
extends java.lang.Object

The superclass for all builders. A builder is a class that provides the structure and content of API documentation. A builder is completely doclet independent which means that any doclet can use builders to construct documentation, as long as it impelements the appropriate writer interfaces. For example, if a doclet wanted to use ConstantsSummaryBuilder to build a constant summary, all it has to do is implement the ConstantsSummaryWriter interface and pass it to the builder using a WriterFactory. 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
protected  Configuration configuration
          The configuration used in this run of the doclet.
protected static java.util.Set<java.lang.String> containingPackagesSeen
          Keep track of which packages we have seen for efficiency purposes.
protected static boolean DEBUG
          True if we want to print debug output.
 
Constructor Summary
AbstractBuilder(Configuration configuration)
          Construct a Builder.
 
Method Summary
abstract  void build()
          Build the documentation.
protected  void build(java.util.List<?> elements)
          Build the documentation, as specified by the given XML elements.
abstract  java.lang.String getName()
          Return the name of this builder.
protected abstract  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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

protected Configuration configuration
The configuration used in this run of the doclet.


containingPackagesSeen

protected static java.util.Set<java.lang.String> containingPackagesSeen
Keep track of which packages we have seen for efficiency purposes. We don't want to copy the doc files multiple times for a single package.


DEBUG

protected static final boolean DEBUG
True if we want to print debug output.

See Also:
Constant Field Values
Constructor Detail

AbstractBuilder

public AbstractBuilder(Configuration configuration)
Construct a Builder.

Parameters:
configuration - the configuration used in this run of the doclet.
Method Detail

getName

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

Returns:
the name of the builder.

build

public abstract void build()
                    throws java.io.IOException
Build the documentation.

Throws:
java.io.IOException - there was a problem writing the output.

build

protected void build(java.util.List<?> elements)
Build the documentation, as specified by the given XML elements.

Parameters:
elements - the XML elements that specify which components to document.

invokeMethod

protected abstract 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.

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