|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.mjdoc.mjdoc_142.MjDoc
org.multijava.mjdoc.mjdoc_142.MjPackageDoc
This class represents a java package and provides methods for finding a package object and the classes within a package.
| Field Summary | |
private static com.sun.javadoc.ClassDoc[] |
carray
A helper object to avoid having to create this all the time. |
private Map |
classes
A map of the classes registered as in this package (String -> ClassDoc), where the String is the name of the class (with enclosing classes, '.' |
private ArrayList |
classesInOrder
This is a list of the classes in the package in the order in which they have been added. |
private ArrayList |
errorClasses
Holder for all error classes registered as part of this package. |
private ArrayList |
exceptionClasses
Holder for all exception classes registered as part of this package. |
private ArrayList |
extMethods
A collection of the compilation units containing external methods in this package. |
private ArrayList |
interfaces
Holder for all interfaces registered as part of this package. |
private String |
location
The location in the file system of the package root. |
private ArrayList |
ordinaryClasses
Holder for all ordinary classes registered as part of this package. |
private String |
packageName
Holder for the String name of the package ('.' separated). |
private static Map |
packages
A map of all the packages created (String -> MjPackageDoc), where the String is the name ('/' separated and terminated) of the package. |
| Fields inherited from class org.multijava.mjdoc.mjdoc_142.MjDoc |
parser |
| Constructor Summary | |
private |
MjPackageDoc(String n)
Creates a new MjPackageDoc object from its '/' separated and terminated name; you should ordinarily use createPackage(java.lang.String) so that distinct MjPackageDoc objects
refer to distinct packages and all the classes for one package are registered
in one MjPackageDoc object. |
| Method Summary | |
void |
addErrorClass(com.sun.javadoc.ClassDoc d)
Registers an MjClassDoc object as an error class. |
void |
addExceptionClass(com.sun.javadoc.ClassDoc d)
Registers an MjClassDoc object as an exception class. |
void |
addExtMethodsUnit(MjExtMethodsDoc m)
Adds a Doc representing the external methods in a compilation unit. |
void |
addInterface(com.sun.javadoc.ClassDoc d)
Registers an MjClassDoc object as an interface class. |
void |
addOrdinaryClass(com.sun.javadoc.ClassDoc d)
Registers an MjClassDoc object as an ordinary (not error, exception, or interface) class. |
com.sun.javadoc.ClassDoc[] |
allClasses()
Returns an array of all the classes and interfaces registered with this package. |
com.sun.javadoc.ClassDoc[] |
allClasses(boolean filter)
Returns an array of all the classes and interfaces registered with this package. |
protected String |
compareString()
This generates the String representation used by compareTo. |
com.sun.javadoc.PackageDoc |
containingPackage()
Required but unused method. |
static MjPackageDoc |
createPackage(String s)
Returns the MjPackageDoc object for the given '/'-separated and terminated name, creating a new one if none currently exists. |
com.sun.javadoc.ClassDoc[] |
errors()
Returns an array of the error classes registered with this package. |
com.sun.javadoc.ClassDoc[] |
exceptions()
Returns an array of the exception classes registered with this package. |
ArrayList |
extMethodsUnits()
Returns a collection of MjExtMethodsDoc objects for this package. |
com.sun.javadoc.ClassDoc |
findClass(String s)
Returns the class or interface in this package given the class name ('.' |
static MjPackageDoc |
findPackage(String p)
Finds an MjPackageDoc from its '/'-separated and terminated name, or returns null if none has yet been created. |
com.sun.javadoc.ClassDoc[] |
interfaces()
Returns an array of the interfaces registered with this package. |
String |
location()
Returns the location of the root of the package. |
MjExtMethodsDoc |
lookup(JCompilationUnitType unit)
Finds the MjExtMethodsDoc object corresponding to the given compilation unit (or creates one if none exists). |
String |
name()
Returns the '.' |
com.sun.javadoc.ClassDoc[] |
ordinaryClasses()
Returns an array of the ordinary classes registered with this package. |
String |
prefix()
Returns the prefix to be appended on the front of a type name to make a fully-qualified name. |
String |
toString()
Returns the '.' |
| Methods inherited from class org.multijava.mjdoc.mjdoc_142.MjDoc |
commentText, 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 |
private String packageName
private String location
private Map classes
private ArrayList classesInOrder
private ArrayList extMethods
private static Map packages
private static final com.sun.javadoc.ClassDoc[] carray
private ArrayList ordinaryClasses
private ArrayList errorClasses
private ArrayList exceptionClasses
private ArrayList interfaces
| Constructor Detail |
private MjPackageDoc(String n)
createPackage(java.lang.String) so that distinct MjPackageDoc objects
refer to distinct packages and all the classes for one package are registered
in one MjPackageDoc object. This constructor automatically registers the
new MjPackageDoc object in the internal map of such objects.
| Method Detail |
public String location()
public static MjPackageDoc findPackage(String p)
public static MjPackageDoc createPackage(String s)
public String name()
name in interface com.sun.javadoc.Docpublic String prefix()
public void addOrdinaryClass(com.sun.javadoc.ClassDoc d)
public void addErrorClass(com.sun.javadoc.ClassDoc d)
public void addExceptionClass(com.sun.javadoc.ClassDoc d)
public void addInterface(com.sun.javadoc.ClassDoc d)
public void addExtMethodsUnit(MjExtMethodsDoc m)
public ArrayList extMethodsUnits()
public MjExtMethodsDoc lookup(JCompilationUnitType unit)
public com.sun.javadoc.PackageDoc containingPackage()
public com.sun.javadoc.ClassDoc[] ordinaryClasses()
ordinaryClasses in interface com.sun.javadoc.PackageDocpublic com.sun.javadoc.ClassDoc[] errors()
errors in interface com.sun.javadoc.PackageDocpublic com.sun.javadoc.ClassDoc[] exceptions()
exceptions in interface com.sun.javadoc.PackageDocpublic com.sun.javadoc.ClassDoc[] interfaces()
interfaces in interface com.sun.javadoc.PackageDocpublic com.sun.javadoc.ClassDoc[] allClasses()
allClasses in interface com.sun.javadoc.PackageDocpublic com.sun.javadoc.ClassDoc[] allClasses(boolean filter)
allClasses in interface com.sun.javadoc.PackageDocpublic com.sun.javadoc.ClassDoc findClass(String s)
findClass in interface com.sun.javadoc.PackageDocpublic String toString()
toString in class Objectprotected String compareString()
compareString in class MjDoc
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||