com.combex.e.edoc
Class ERootDoc

java.lang.Object
  |
  +--com.combex.e.edoc.EDoc
        |
        +--com.combex.e.edoc.ERootDoc
All Implemented Interfaces:
Comparable, sun.tools.java.Constants, com.sun.javadoc.Doc, com.sun.javadoc.DocErrorReporter, Marker, PassByConstruction, com.sun.javadoc.RootDoc, sun.tools.java.RuntimeConstants, Serializable

class ERootDoc
extends EDoc
implements com.sun.javadoc.RootDoc, sun.tools.java.Constants


Field Summary
(package private) static Locale locale
          The locale to be used.
private static String localeName
          The locale name will be set by Main, if option is provided on the command line.
private  EClassDoc[] myClassesCache
          A cached list of all the classes to be documented.
private  List myCmdLineClasses
          list of classes specified on the command line.
private  List myCmdLinePackages
          list of packages specified on the command line.
private  ConstMap myDocBySigCache
          A cached map from type signatures to EClassDocs.
(package private)  List myOptions
          a collection of all options.
private static java.text.Collator TheCollator
          The TheCollator for this application.
 
Fields inherited from interface org.erights.e.elib.serial.PassByConstruction
HONORARY, HONORED_NAMES, serialVersionUID
 
Constructor Summary
ERootDoc(EDocBuilder builder, com.sun.javadoc.RootDoc rootDoc)
           
 
Method Summary
(package private)  boolean checkAccess()
          Hook so we can allow unfiltered access, with a yet to be determined API change.
 com.sun.javadoc.ClassDoc[] classes()
          classes and interfaces to be documented.
 com.sun.javadoc.ClassDoc classNamed(String qualifiedName)
          Return a EClassDoc for the specified class/interface name
(package private)  EComment comment()
          For lazy initialization of comment.
 String commentText()
          Return the text of the comment for this doc item.
 int compareTo(Object obj)
          Compares this Object with the specified Object for order.
 com.sun.javadoc.Tag[] firstSentenceTags()
           
(package private)  java.text.CollationKey generateKey()
          generate a key for sorting.
(package private) static java.text.Collator GetCollator()
           
private  ConstMap getDocBySigMap()
          Returns a map from type signatures to EClassDocs.
 EType getETypeFromSig(String sig)
          Convert from a type signature to an EType.
(package private) static Locale getLocale()
          Get the locale if specified on the command line else return null and if locale option is not used then return default locale.
 String getRawCommentText()
          Return the full unprocessed text of the comment.
 com.sun.javadoc.Tag[] inlineTags()
           
 void invalidateClassesCache()
           
 boolean isClass()
          Is this Doc item a class.
 boolean isConstructor()
          Is this Doc item a constructor? False until overridden.
 boolean isError()
          Is this Doc item a error class? False until overridden.
 boolean isException()
          Is this Doc item a exception class? False until overridden.
 boolean isField()
          Is this Doc item a field? False until overridden.
 boolean isIncluded()
          return true if this Doc is included in the active set.
 boolean isInterface()
          Is this Doc item a interface? False until overridden.
 boolean isMethod()
          Is this Doc item a simple method (i.e.
 boolean isOrdinaryClass()
          Is this Doc item a ordinary class (i.e.
(package private)  java.text.CollationKey key()
          return a key for sorting.
static ArrayList list(Object[] array)
           
 String name()
          Return the name of this Doc item.
 String[][] options()
          Command line options.
(package private) static String[][] options(List optsList)
           
 com.sun.javadoc.PackageDoc packageNamed(String name)
          Return a PackageDoc for the specified package name
 com.sun.javadoc.SourcePosition position()
          Need for 1.4
 void printError(com.sun.javadoc.SourcePosition sourcePosition, String s)
          Need for 1.4
 void printError(String msg)
          Print error message, increment error count.
 void printNotice(com.sun.javadoc.SourcePosition sourcePosition, String s)
          Need for 1.4
 void printNotice(String msg)
          Print a message.
 void printWarning(com.sun.javadoc.SourcePosition sourcePosition, String s)
          Need for 1.4
 void printWarning(String msg)
          Print warning message, increment warning count.
(package private)  String readHTMLDocumentation(InputStream input, String filename)
          Utility for subclasses which read HTML documentation files.
(package private) static Locale searchLocale(String language, String country, String variant)
          Search the locale for specified language, specified country and specified variant.
 com.sun.javadoc.SeeTag[] seeTags()
          Return the see also tags in this Doc item.
(package private) static void setLocale()
           
(package private) static void setLocale(String localename)
          Set the locale for the application.
 void setRawCommentText(String rawDocumentation)
          Set the full unprocessed text of the comment.
 com.sun.javadoc.ClassDoc[] specifiedClasses()
          classes and interfaces specified on the command line.
 com.sun.javadoc.PackageDoc[] specifiedPackages()
          packages specified on the command line.
 com.sun.javadoc.Tag[] tags()
          Return all tags in this Doc item.
 com.sun.javadoc.Tag[] tags(String tagname)
          Return tags of the specified kind in this Doc item.
(package private)  EClassDoc thisClassDocImpl()
           
(package private)  String toQualifiedString()
          Returns the qualified string representation of this Doc item.
 String toString()
          Returns a string representation of this Doc item.
static EDoc[] visible(List list, Class memType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

TheCollator

private static java.text.Collator TheCollator
The TheCollator for this application. This is to take care of Locale Specific or Natural Language Text sorting.


locale

static Locale locale
The locale to be used. If user doesen't provide this, then set it to default locale value.


localeName

private static String localeName
The locale name will be set by Main, if option is provided on the command line.


myCmdLineClasses

private final List myCmdLineClasses
list of classes specified on the command line.


myCmdLinePackages

private final List myCmdLinePackages
list of packages specified on the command line.


myOptions

final List myOptions
a collection of all options.


myClassesCache

private transient EClassDoc[] myClassesCache
A cached list of all the classes to be documented.


myDocBySigCache

private transient ConstMap myDocBySigCache
A cached map from type signatures to EClassDocs.

Constructor Detail

ERootDoc

public ERootDoc(EDocBuilder builder,
                com.sun.javadoc.RootDoc rootDoc)
Method Detail

setLocale

static void setLocale(String localename)
Set the locale for the application. Also set the TheCollator to be used depending upon this locale.


setLocale

static void setLocale()

GetCollator

static java.text.Collator GetCollator()

getLocale

static Locale getLocale()
Get the locale if specified on the command line else return null and if locale option is not used then return default locale.


searchLocale

static Locale searchLocale(String language,
                           String country,
                           String variant)
Search the locale for specified language, specified country and specified variant.


checkAccess

boolean checkAccess()
Hook so we can allow unfiltered access, with a yet to be determined API change.

Overrides:
checkAccess in class EDoc

options

public String[][] options()
Command line options.
 For example, given:
     javadoc -foo this that -bar other ...

 This method will return:
      options()[0][0] = "-foo"
      options()[0][1] = "this"
      options()[0][2] = "that"
      options()[1][0] = "-bar"
      options()[1][1] = "other"
 

Returns:
an array of arrays of String.

options

static String[][] options(List optsList)

specifiedPackages

public com.sun.javadoc.PackageDoc[] specifiedPackages()
packages specified on the command line.


specifiedClasses

public com.sun.javadoc.ClassDoc[] specifiedClasses()
classes and interfaces specified on the command line.


invalidateClassesCache

public void invalidateClassesCache()

classes

public com.sun.javadoc.ClassDoc[] classes()
classes and interfaces to be documented.

Computed once and cached, then returned from cache until cache is invalidated. This isn't done automatically. Rather, the client of this data structure must call invalidateClassesCache() between performing an operation that invalidates this cache and one that uses this cache. These operations are classes(), getDocBySigMap(), and getETypeFromSig(java.lang.String).


getDocBySigMap

private ConstMap getDocBySigMap()
Returns a map from type signatures to EClassDocs.

Depends on the cache being valid.

See Also:
invalidateClassesCache()

getETypeFromSig

public EType getETypeFromSig(String sig)
Convert from a type signature to an EType.

Depends on the cache being valid.

See Also:
invalidateClassesCache()

name

public String name()
Return the name of this Doc item.

Specified by:
name in class EDoc
Returns:
the string "*ERootDoc*".

packageNamed

public com.sun.javadoc.PackageDoc packageNamed(String name)
Return a PackageDoc for the specified package name

Parameters:
name - package name
Returns:
a PackageDoc holding the specified package, null if this package is not referenced.

classNamed

public com.sun.javadoc.ClassDoc classNamed(String qualifiedName)
Return a EClassDoc for the specified class/interface name

Parameters:
qualifiedName - qualified class name (i.e. includes package name).
Returns:
a EClassDoc holding the specified class, null if this class is not referenced.

isIncluded

public boolean isIncluded()
return true if this Doc is included in the active set. ERootDoc isn't even a program entity so it is always false.

Specified by:
isIncluded in class EDoc

printError

public void printError(String msg)
Print error message, increment error count.

Parameters:
msg - message to print

printWarning

public void printWarning(String msg)
Print warning message, increment warning count.

Parameters:
msg - message to print

printNotice

public void printNotice(String msg)
Print a message.

Parameters:
msg - message to print

printError

public void printError(com.sun.javadoc.SourcePosition sourcePosition,
                       String s)
Need for 1.4


printWarning

public void printWarning(com.sun.javadoc.SourcePosition sourcePosition,
                         String s)
Need for 1.4


printNotice

public void printNotice(com.sun.javadoc.SourcePosition sourcePosition,
                        String s)
Need for 1.4


list

public static ArrayList list(Object[] array)

comment

EComment comment()
For lazy initialization of comment.


commentText

public String commentText()
Return the text of the comment for this doc item. TagImpls have been removed.


tags

public com.sun.javadoc.Tag[] tags()
Return all tags in this Doc item.

Returns:
an array of Tag containing all tags on this Doc item.

tags

public com.sun.javadoc.Tag[] tags(String tagname)
Return tags of the specified kind in this Doc item.

Parameters:
tagname - name of the tag kind to search for.
Returns:
an array of ETag containing all tags whose 'kind()' matches 'tagname'.

seeTags

public com.sun.javadoc.SeeTag[] seeTags()
Return the see also tags in this Doc item.

Returns:
an array of SeeTag containing all @see tags.

inlineTags

public com.sun.javadoc.Tag[] inlineTags()

firstSentenceTags

public com.sun.javadoc.Tag[] firstSentenceTags()

readHTMLDocumentation

String readHTMLDocumentation(InputStream input,
                             String filename)
                       throws IOException
Utility for subclasses which read HTML documentation files.

IOException

getRawCommentText

public String getRawCommentText()
Return the full unprocessed text of the comment. Tags are included as text. Used mainly for store and retrieve operations like internalization.


setRawCommentText

public void setRawCommentText(String rawDocumentation)
Set the full unprocessed text of the comment. Tags are included as text. Used mainly for store and retrieve operations like internalization.


thisClassDocImpl

EClassDoc thisClassDocImpl()

key

java.text.CollationKey key()
return a key for sorting.


generateKey

java.text.CollationKey generateKey()
generate a key for sorting.

default is toString();


toString

public String toString()
Returns a string representation of this Doc item.

Overrides:
toString in class Object
Returns:
the name

toQualifiedString

String toQualifiedString()
Returns the qualified string representation of this Doc item.

Returns:
the qualified name.

compareTo

public int compareTo(Object obj)
Compares this Object with the specified Object for order. Returns a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.

Included so that Doc item are java.lang.Comparable.

Specified by:
compareTo in interface Comparable
Parameters:
obj - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.
Throws:
ClassCastException - the specified Object's type prevents it from being compared to this Object.

isField

public boolean isField()
Is this Doc item a field? False until overridden.

Returns:
true if it represents a field

isMethod

public boolean isMethod()
Is this Doc item a simple method (i.e. not a constructor)? False until overridden.

Returns:
true is it represents a method, false if it is anything else, including constructor, field, class, ...

isConstructor

public boolean isConstructor()
Is this Doc item a constructor? False until overridden.

Returns:
true is it represents a constructor

isInterface

public boolean isInterface()
Is this Doc item a interface? False until overridden.

Returns:
true is it represents a interface

isException

public boolean isException()
Is this Doc item a exception class? False until overridden.

Returns:
true is it represents a exception

isError

public boolean isError()
Is this Doc item a error class? False until overridden.

Returns:
true is it represents a error

isOrdinaryClass

public boolean isOrdinaryClass()
Is this Doc item a ordinary class (i.e. not an interface, exception, or error)? False until overridden.

Returns:
true is it represents a class

isClass

public boolean isClass()
Is this Doc item a class. Note: interfaces are not classes. False until overridden.

Returns:
true is it represents a class

visible

public static EDoc[] visible(List list,
                             Class memType)

position

public com.sun.javadoc.SourcePosition position()
Need for 1.4



comments?