|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.mjdoc.mjdoc_142.MjdocWrapper
This class is a bridge between the Mjc parsing mechanisms in Main and the html generation mechanisms in MjRootDoc and related classes.
| Nested Class Summary | |
static class |
MjdocWrapper.CClassMap
|
static class |
MjdocWrapper.MjPrivacyChecker
|
static interface |
MjdocWrapper.PrivacyChecker
|
| Field Summary | |
private static String |
appName
|
private static String |
classpath
The classpath specified by the -classpath option |
protected Compiler |
compiler
|
private static File |
destination
The destination specified by the -d option. |
(package private) static boolean |
doallfcns
If true, then create generic function html pages for internal as well as external functions. |
private static String |
docletname
The name of a doclet, as specified in the options. |
private static String |
docletpath
The path in which to search for the doclet, if specified in the options. |
(package private) static boolean |
docupages
If true, then generate pages for the external method part of each compilation unit. |
(package private) static boolean |
donofcns
If true, then generate no html pages for any generic functions. |
protected static Map |
map
Map of CClass to MjClassDoc for all classes encountered in parsing. |
protected static MjdocWrapper.CClassMap |
mapper
|
private static long |
privacy
The privacy level controlling the items listed in the html: 0 - public only, 1 - public and protected, 2 - all but private, 3 - everything. |
static MjdocWrapper.PrivacyChecker |
privacyChecker
|
private static MjRootDoc |
root
Holds the RootDoc value that is the root of the tree representing all the classes being documented. |
private static String |
sourcepath
The sourcepath specified by the -sourcepath option |
protected static MjdocWrapper |
wrapper
|
| Constructor Summary | |
MjdocWrapper(Compiler c)
|
|
| Method Summary | |
static String |
appName()
|
static boolean |
checkPrivacy(long mods)
Returns true if the given modifiers combined with the privacy level set in the options are such as to have the program element listed in the html. |
static boolean |
complete()
This initiates the generation of html, given the tree of information loaded into the javadoc classes. |
private static File |
findFile(String dirlist,
String filename)
Searches for the given file in some component of the given pathlist, returning a corresponding File object if found or null if not found. |
private static String[] |
formArray(String[] args,
int i,
int n)
This is a helper method that creates a String[] of length n containing the elements args[i] .. args[i+n-1]. |
protected void |
handleQuiet(MjcCommonOptions options)
Handle Jmldoc's Quiet option |
static MjClassDoc |
lookup(CClass cclass)
Returns the MjClassDoc object generated from the given CClass; if the CClass object was not previously registered, an MjClassDoc object is created. |
private static int |
optionLength(String s)
This function returns the number of arguments that follow a given option (+1 for the option itself) in the command-line. |
private void |
parseArguments(String[] args,
MjcCommonOptions options,
ArrayList remainingArgs)
Parse the Javadoc options into the options structure |
private void |
parseOptions(MjcCommonOptions options,
ArrayList opt)
Loads the javadoc options from the Options AST into an array so they can be passed to javadoc |
static long |
privacy()
|
static void |
quiet(boolean b)
Turns off all informational messages. |
static String |
readFile(File f)
Reads a text file into a String. |
void |
register(CompilerPassEnterable tree)
Loads all the classes and interfaces contained in 'tree' into the RootDoc. |
static void |
register(CType ct)
Makes sure that the given type is registered as a referenced class, if appropriate. |
void |
register(JCompilationUnitType unit)
Loads all the classes and interfaces contained in 'tree' into the RootDoc. |
(package private) void |
register(JTypeDeclarationType jtype)
Registers a specific class or interface (and any classes or interfaces nested or referenced within it) into the RootDoc. |
void |
registerGFs(ArrayList tlmethods,
MjExtMethodsDoc mje)
|
void |
registerTypeDeclarations(JCompilationUnitType unit)
|
void |
registerTypeDeclarations(JTypeDeclarationType[] jtypes,
JCompilationUnitType unit)
|
static MjRootDoc |
root()
|
void |
select(JTypeDeclarationType jtype)
|
void |
selected(CompilerPassEnterable tree)
Loads all the classes and interfaces contained in 'trees' as command-line specified classes, for which javadoc documents will be generated. |
void |
selected(JTypeDeclarationType jtype)
Loads all the given class as command-line specified classes, for which documents will be generated. |
void |
selected(JTypeDeclarationType[] jtypes,
JCompilationUnitType unit)
|
static void |
selectPackages(ArrayList v)
This function creates and specifies the list of packages in the given ArrayList; the ArrayList consists of String objects, each of which is a '/'-separated and '/'-terminated package name. |
void |
selectTypeDeclarations(JCompilationUnitType unit)
|
static void |
setAppName(String n)
|
(package private) static void |
setDocComment(MjDoc doc,
File f)
Sets the javadoc comment in the given Doc using the content (between and ) of the given file. |
(package private) static void |
setDocComment(MjDoc doc,
MjcCommonOptions opts,
String pathlist)
Sets the overview doc comment using the overview option in 'opts' . |
static void |
setDoclet(String n)
Sets the doclet to run |
String[] |
setOptions(String[] args,
MjcCommonOptions options)
This routine parses the command-line options provided in 'args', recognizing any javadoc-related options and their arguments. |
static void |
setWrapper(MjdocWrapper w)
|
static MjdocWrapper |
wrapper()
Allows subclasses to change the wrapper behavior. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Compiler compiler
private static MjRootDoc root
protected static MjdocWrapper wrapper
static boolean doallfcns
static boolean donofcns
static boolean docupages
private static String docletname
private static String docletpath
private static String classpath
private static String sourcepath
private static File destination
private static long privacy
public static MjdocWrapper.PrivacyChecker privacyChecker
private static String appName
protected static Map map
protected static MjdocWrapper.CClassMap mapper
| Constructor Detail |
public MjdocWrapper(Compiler c)
| Method Detail |
public static MjRootDoc root()
public static MjdocWrapper wrapper()
public static void setWrapper(MjdocWrapper w)
public static long privacy()
public static boolean checkPrivacy(long mods)
public static void setDoclet(String n)
public static void quiet(boolean b)
public static String appName()
public static void setAppName(String n)
public static MjClassDoc lookup(CClass cclass)
public static void selectPackages(ArrayList v)
public void selected(CompilerPassEnterable tree)
throws Exception
Exceptionpublic void selectTypeDeclarations(JCompilationUnitType unit)
public void selected(JTypeDeclarationType[] jtypes,
JCompilationUnitType unit)
public void selected(JTypeDeclarationType jtype)
throws Exception
Exceptionpublic void select(JTypeDeclarationType jtype)
public void register(CompilerPassEnterable tree)
throws Exception
Exception
public void register(JCompilationUnitType unit)
throws Exception
Exceptionpublic void registerTypeDeclarations(JCompilationUnitType unit)
public void registerTypeDeclarations(JTypeDeclarationType[] jtypes,
JCompilationUnitType unit)
public void registerGFs(ArrayList tlmethods,
MjExtMethodsDoc mje)
void register(JTypeDeclarationType jtype)
throws Exception
jtype - A specific class or interface to register as referenced
Exceptionpublic static void register(CType ct)
public static boolean complete()
private static String[] formArray(String[] args,
int i,
int n)
private static int optionLength(String s)
public String[] setOptions(String[] args,
MjcCommonOptions options)
private void parseArguments(String[] args,
MjcCommonOptions options,
ArrayList remainingArgs)
private void parseOptions(MjcCommonOptions options,
ArrayList opt)
protected void handleQuiet(MjcCommonOptions options)
public static String readFile(File f)
throws Exception
Exception
static void setDocComment(MjDoc doc,
MjcCommonOptions opts,
String pathlist)
private static File findFile(String dirlist,
String filename)
static void setDocComment(MjDoc doc,
File f)
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||