mjc

org.multijava.mjdoc.mjdoc_142
Class MjRootDoc

java.lang.Object
  extended byorg.multijava.mjdoc.mjdoc_142.MjDoc
      extended byorg.multijava.mjdoc.mjdoc_142.MjRootDoc
All Implemented Interfaces:
Comparable, com.sun.javadoc.Doc, com.sun.javadoc.DocErrorReporter, com.sun.javadoc.RootDoc

public class MjRootDoc
extends MjDoc
implements com.sun.javadoc.RootDoc

This class implements the Doclet interface for a RootDoc by containing lists of bridge classes for packages and classes.

Author:
David R. Cok

Field Summary
private  SortedSet allMethods
          Holds a list of all the methods in all the classes (not interfaces ?
private  Map classes
          Holds a mapping from the qualifiedTypeName of a class/interface to the MjClassDoc object that wraps it.
private  Compiler compiler
          Holds a reference to the compiler, for printing error, warning, and informational messages.
private  ArrayList extMethodsCU
          Holds a list of the external methods compilation units.
private  String[][] opt
          Holds a representation of the command-line options relevant to html generation.
private  Map packages
          Holds a mapping from the name of a package to the MjPackageDoc object that wraps it.
private  boolean quiet
          If true, no informational messages are printed.
private  ArrayList specifiedClasses
          Holds a list of the classes that are 'specified classes', namely those that will have html generated.
private  ArrayList specifiedExtMethodUnits
          Holds a list of the ext methods units that are 'specified', namely those that will have html generated.
private  ArrayList specifiedPackages
          Holds a list of the packages that are 'specified packages', namely those that will have html generated.
private  HashSet specifiedPackagesHash
           
 
Fields inherited from class org.multijava.mjdoc.mjdoc_142.MjDoc
parser
 
Constructor Summary
MjRootDoc(Compiler compiler, String[][] opts)
          Constructs a new RootDoc, innitialized with the relevant command-line options.
 
Method Summary
 void add(com.sun.javadoc.ClassDoc c)
          Adds a class or interface to the set of objects that the RootDoc knows about.
 void add(com.sun.javadoc.PackageDoc c)
          Adds a package (but not its contents) to the set of objects that the RootDoc knows about.
 void add(MjExtMethodsDoc m)
          Adds an external method compilation unit.
 void add(MjMethodDoc m)
          Adds a method to the registered set of methods.
 SortedSet allMethods()
          Returns the list of methods that have been registered.
 com.sun.javadoc.ClassDoc[] classes()
          Returns all the classes and interfaces specified, whether as a file or as a package.
 com.sun.javadoc.ClassDoc classNamed(String qualifiedName)
          Returns the class or interface with a specific fully-qualified name, null if it is not known.
 com.sun.javadoc.PackageDoc containingPackage()
           
 ArrayList extMethods()
          Returns the collection of all the registered external method compilation units.
 boolean isSpecified(com.sun.javadoc.PackageDoc c)
           
 String name()
          Required by the Doc interface, but not normally called.
 String[][] options()
          Returns the cached option structure, as provided to the constructor.
 com.sun.javadoc.PackageDoc packageNamed(String name)
          Returns the package with a specific name, null if it is not known.
 void printError(com.sun.javadoc.SourcePosition pos, String s)
          This method prints an error to diagnostic output.
 void printError(String s)
          This method prints an error to diagnostic output.
 void printNotice(com.sun.javadoc.SourcePosition pos, String s)
          This method prints an notice to normal output.
 void printNotice(String s)
          This method prints an notice to normal output.
 void printWarning(com.sun.javadoc.SourcePosition pos, String s)
          This method prints a warning to diagnostic output.
 void printWarning(String s)
          This method prints an warning to diagnostic output.
 void quiet(boolean b)
           
 com.sun.javadoc.ClassDoc[] specifiedClasses()
          Returns an array of all the specified classes (but not classes in specified packages).
 ArrayList specifiedExtMethods()
          Returns the collection of the specified external method compilation units.
 com.sun.javadoc.PackageDoc[] specifiedPackages()
          Returns an array of all the specified packages.
 void specify(com.sun.javadoc.ClassDoc c)
          Marks a class or interface as specified (it must also be added explicitly by add(ClassDoc)).
 void specify(com.sun.javadoc.PackageDoc c)
          Marks a package as specified (it must also be added explicitly by add(PackageDoc)).
 void specify(MjExtMethodsDoc c)
          Marks a ext. method unit as specified (it must also be added explicitly by add(ClassDoc)).
 SortedSet topConcreteMethods(com.sun.javadoc.PackageDoc p)
          Returns the list of top concrete methods of all the registered methods.
 String toString()
          Conventional toString value, matches javadoc behavior.
 void unspecify(com.sun.javadoc.ClassDoc c)
          Marks a class or interface as NOT specified.
 
Methods inherited from class org.multijava.mjdoc.mjdoc_142.MjDoc
commentText, compareString, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, notImplemented, position, seeTags, setIncluded, setRawCommentText, setRawCommentText, setRawCommentText, setRawCommentText, tags, tags, tags
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, position, seeTags, setRawCommentText, tags, tags
 

Field Detail

opt

private String[][] opt
Holds a representation of the command-line options relevant to html generation.


compiler

private Compiler compiler
Holds a reference to the compiler, for printing error, warning, and informational messages.


classes

private Map classes
Holds a mapping from the qualifiedTypeName of a class/interface to the MjClassDoc object that wraps it.


packages

private Map packages
Holds a mapping from the name of a package to the MjPackageDoc object that wraps it.


allMethods

private SortedSet allMethods
Holds a list of all the methods in all the classes (not interfaces ? !FIXME!) that have been registered.


specifiedClasses

private ArrayList specifiedClasses
Holds a list of the classes that are 'specified classes', namely those that will have html generated.


specifiedPackages

private ArrayList specifiedPackages
Holds a list of the packages that are 'specified packages', namely those that will have html generated.


specifiedPackagesHash

private HashSet specifiedPackagesHash

specifiedExtMethodUnits

private ArrayList specifiedExtMethodUnits
Holds a list of the ext methods units that are 'specified', namely those that will have html generated.


extMethodsCU

private ArrayList extMethodsCU
Holds a list of the external methods compilation units.


quiet

private boolean quiet
If true, no informational messages are printed.

Constructor Detail

MjRootDoc

public MjRootDoc(Compiler compiler,
                 String[][] opts)
Constructs a new RootDoc, innitialized with the relevant command-line options.

Parameters:
opts - an array of String[] each of which has an option and the option's arguments in it
Method Detail

quiet

public void quiet(boolean b)

add

public void add(MjExtMethodsDoc m)
Adds an external method compilation unit.


extMethods

public ArrayList extMethods()
Returns the collection of all the registered external method compilation units.


specifiedExtMethods

public ArrayList specifiedExtMethods()
Returns the collection of the specified external method compilation units.


specify

public void specify(MjExtMethodsDoc c)
Marks a ext. method unit as specified (it must also be added explicitly by add(ClassDoc)).


add

public void add(MjMethodDoc m)
Adds a method to the registered set of methods.


allMethods

public SortedSet allMethods()
Returns the list of methods that have been registered.


topConcreteMethods

public SortedSet topConcreteMethods(com.sun.javadoc.PackageDoc p)
Returns the list of top concrete methods of all the registered methods.


add

public void add(com.sun.javadoc.ClassDoc c)
Adds a class or interface to the set of objects that the RootDoc knows about.


specify

public void specify(com.sun.javadoc.ClassDoc c)
Marks a class or interface as specified (it must also be added explicitly by add(ClassDoc)).


unspecify

public void unspecify(com.sun.javadoc.ClassDoc c)
Marks a class or interface as NOT specified.


add

public void add(com.sun.javadoc.PackageDoc c)
Adds a package (but not its contents) to the set of objects that the RootDoc knows about.


specify

public void specify(com.sun.javadoc.PackageDoc c)
Marks a package as specified (it must also be added explicitly by add(PackageDoc)).


isSpecified

public boolean isSpecified(com.sun.javadoc.PackageDoc c)

classes

public com.sun.javadoc.ClassDoc[] classes()
Returns all the classes and interfaces specified, whether as a file or as a package.

Specified by:
classes in interface com.sun.javadoc.RootDoc

options

public String[][] options()
Returns the cached option structure, as provided to the constructor.

Specified by:
options in interface com.sun.javadoc.RootDoc

classNamed

public com.sun.javadoc.ClassDoc classNamed(String qualifiedName)
Returns the class or interface with a specific fully-qualified name, null if it is not known. A class may be found even if it is not specified on the command line, if it has been referenced in parsing some otherwise parsed class. It is not sufficient simply to be a legitimate class on the CLASSPATH. CAUTION: Not guaranteed to produce the same result as the doclet api. !FIXME! - should this have the classes inside registered packages ?

Specified by:
classNamed in interface com.sun.javadoc.RootDoc

packageNamed

public com.sun.javadoc.PackageDoc packageNamed(String name)
Returns the package with a specific name, null if it is not known. A package is known if a file has been parsed or class referenced that is in that package. NOTE: The above description is what the Doclet API specifies, but javadoc seems to recognize more packages than have been referenced in the input source code. !FIXME!

Specified by:
packageNamed in interface com.sun.javadoc.RootDoc

specifiedClasses

public com.sun.javadoc.ClassDoc[] specifiedClasses()
Returns an array of all the specified classes (but not classes in specified packages).

Specified by:
specifiedClasses in interface com.sun.javadoc.RootDoc

specifiedPackages

public com.sun.javadoc.PackageDoc[] specifiedPackages()
Returns an array of all the specified packages.

Specified by:
specifiedPackages in interface com.sun.javadoc.RootDoc

name

public String name()
Required by the Doc interface, but not normally called.

Specified by:
name in interface com.sun.javadoc.Doc

toString

public String toString()
Conventional toString value, matches javadoc behavior.

Overrides:
toString in class Object

containingPackage

public com.sun.javadoc.PackageDoc containingPackage()
Description copied from class: MjDoc
Returns the package this Doc is in.


printError

public void printError(String s)
This method prints an error to diagnostic output.

Specified by:
printError in interface com.sun.javadoc.DocErrorReporter

printError

public void printError(com.sun.javadoc.SourcePosition pos,
                       String s)
This method prints an error to diagnostic output.

Specified by:
printError in interface com.sun.javadoc.DocErrorReporter

printWarning

public void printWarning(String s)
This method prints an warning to diagnostic output.

Specified by:
printWarning in interface com.sun.javadoc.DocErrorReporter

printWarning

public void printWarning(com.sun.javadoc.SourcePosition pos,
                         String s)
This method prints a warning to diagnostic output.

Specified by:
printWarning in interface com.sun.javadoc.DocErrorReporter

printNotice

public void printNotice(String s)
This method prints an notice to normal output.

Specified by:
printNotice in interface com.sun.javadoc.DocErrorReporter

printNotice

public void printNotice(com.sun.javadoc.SourcePosition pos,
                        String s)
This method prints an notice to normal output.

Specified by:
printNotice in interface com.sun.javadoc.DocErrorReporter

mjc

mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.