com.combex.e.edoc
Class EClassDoc

java.lang.Object
  |
  +--com.combex.e.edoc.EDoc
        |
        +--com.combex.e.edoc.EProgramElementDoc
              |
              +--com.combex.e.edoc.EClassDoc
All Implemented Interfaces:
com.sun.javadoc.ClassDoc, Comparable, com.sun.javadoc.Doc, EType, Marker, PassByConstruction, com.sun.javadoc.ProgramElementDoc, Serializable, com.sun.javadoc.Type

class EClassDoc
extends EProgramElementDoc
implements com.sun.javadoc.ClassDoc, EType


Field Summary
private static int ERROR
           
private static int EXCEPTION
           
private static int EXTERNALIZABLE
           
private static int INTERFACE
           
private  List myConstructors
           
(package private)  EClassDoc myContainingClass
           
(package private)  EPackageDoc myContainingPackage
           
private  List myFields
           
private  List myImportedClasses
           
private  List myImportedPackages
           
private  List myInnerClasses
           
private  EClassDoc[] myInterfaces
           
(package private)  boolean myIsIncluded
           
private  int myKind
           
(package private)  List myMethods
           
(package private)  int myModifiers
           
(package private)  String myName
           
(package private)  String myQualifier
           
private  int mySerializationKind
           
private  ESerializedForm mySerializedForm
           
private  EClassDoc mySuperclass
           
private static int NOT_SERIALIZABLE
           
private static int ORDINARY_CLASS
           
private static int SERIALIZABLE
           
 
Fields inherited from interface org.erights.e.elib.serial.PassByConstruction
HONORARY, HONORED_NAMES, serialVersionUID
 
Constructor Summary
EClassDoc(EDocBuilder builder, com.sun.javadoc.ClassDoc classDoc)
           
 
Method Summary
 com.sun.javadoc.ClassDoc asClassDoc()
          Return this type as a class.
(package private)  boolean checkAccess()
          Hook so we can allow unfiltered access, with a yet to be determined API addition.
(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.ConstructorDoc[] constructors()
          Return constructors in class.
 com.sun.javadoc.ClassDoc containingClass()
          Get the containing class of this program element.
 com.sun.javadoc.PackageDoc containingPackage()
          Return the package that this class is contained in.
 boolean definesSerializableFields()
          Return true if Serializable fields are explicitly defined with the special class member serialPersistentFields.
 String dimension()
          Return the type's dimension information, as a string.
 com.sun.javadoc.FieldDoc[] fields()
          Return fields in class.
 com.sun.javadoc.ClassDoc findClass(String className)
          Find a class within the context of this class.
 EConstructorDoc findConstructor(String constrName, String[] paramTypeArray)
          Find constructor in this class.
 EFieldDoc findField(String fieldName)
           
 EMethodDoc findMethod(java.lang.reflect.Method method)
           
 EMethodDoc findMethod(String methodName, String[] paramTypeArray)
           
 com.sun.javadoc.Tag[] firstSentenceTags()
           
(package private)  java.text.CollationKey generateKey()
          generate a key for sorting.
 String getRawCommentText()
          Return the full unprocessed text of the comment.
 com.sun.javadoc.ClassDoc[] implementedInterfaces()
          Deprecated. Use interfaces() - this method will go away by FCS.
 com.sun.javadoc.ClassDoc[] importedClasses()
          Get the list of classes declared as imported.
 com.sun.javadoc.PackageDoc[] importedPackages()
          Get the list of packages declared as imported.
 com.sun.javadoc.Tag[] inlineTags()
           
 com.sun.javadoc.ClassDoc[] innerClasses()
          Return inner classes within this class.
 com.sun.javadoc.ClassDoc[] interfaces()
          Return interfaces implemented by this class or interfaces extended by this interface.
 boolean isAbstract()
          Return true if this class is abstract
 boolean isClass()
          return true if this is a class, not an interface.
 boolean isConstructor()
          Is this Doc item a constructor? False until overridden.
 boolean isError()
          Return true if this is an error class
 boolean isException()
          Return true if this is an exception class
 boolean isExternalizable()
          Return true if this class implements java.io.Externalizable.
 boolean isField()
          Is this Doc item a field? False until overridden.
 boolean isFinal()
          Return true if this program element is final
 boolean isIncluded()
          return true if this class is included in the active set.
 boolean isInterface()
          Return true if this is an interface.
 boolean isMethod()
          Is this Doc item a simple method (i.e.
 boolean isOrdinaryClass()
          Return true if this is a ordinary class, not an exception, an error, or an interface.
 boolean isPackagePrivate()
          Return true if this program element is package private
 boolean isPrivate()
          Return true if this program element is private
 boolean isProtected()
          Return true if this program element is protected
 boolean isPublic()
          Return true if this program element is public
 boolean isSerializable()
          Return true if this class implements java.io.Serializable.
 boolean isStatic()
          Return true if this program element is static
(package private)  java.text.CollationKey key()
          return a key for sorting.
static ArrayList list(Object[] array)
           
 com.sun.javadoc.MethodDoc[] methods()
          Return methods in class.
 String modifiers()
          Return the modifier string for this class.
 int modifierSpecifier()
          Get the modifier specifier integer.
 String name()
          Return the class name without qualifier as a String.
 com.sun.javadoc.SourcePosition position()
          Need for 1.4
 String qualifiedName()
          Return the qualified class name as a String.
 String qualifiedTypeName()
          Return qualified name of type excluding any dimension information.
(package private)  String readHTMLDocumentation(InputStream input, String filename)
          Utility for subclasses which read HTML documentation files.
private  EFieldDoc searchField(String fieldName, Set searchedClassSet)
          Find a field in this class scope.
private  EMethodDoc searchMethod(String methodName, String[] paramTypeArray, Set searchedClassSet)
          Find a method in this class scope.
 com.sun.javadoc.SeeTag[] seeTags()
          Return the see also tags in this Doc item.
 com.sun.javadoc.FieldDoc[] serializableFields()
          Return the Serializable fields of class.
 com.sun.javadoc.MethodDoc[] serializationMethods()
          Return the serialization methods for this class.
 void setRawCommentText(String rawDocumentation)
          Set the full unprocessed text of the comment.
 boolean subclassOf(com.sun.javadoc.ClassDoc cd)
          Test whether this class is a subclass of the specified class.
 com.sun.javadoc.ClassDoc superclass()
          Return the superclass of this class
 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 the class.
 String typeName()
          Return unqualified name of type excluding any dimension information.
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

NOT_SERIALIZABLE

private static final int NOT_SERIALIZABLE

SERIALIZABLE

private static final int SERIALIZABLE

EXTERNALIZABLE

private static final int EXTERNALIZABLE

INTERFACE

private static final int INTERFACE

ORDINARY_CLASS

private static final int ORDINARY_CLASS

EXCEPTION

private static final int EXCEPTION

ERROR

private static final int ERROR

myKind

private final int myKind

myQualifier

final String myQualifier

myName

final String myName

mySuperclass

private final EClassDoc mySuperclass

myContainingPackage

final EPackageDoc myContainingPackage

myFields

private final List myFields

myMethods

final List myMethods

myConstructors

private final List myConstructors

myInnerClasses

private final List myInnerClasses

myInterfaces

private final EClassDoc[] myInterfaces

myImportedClasses

private final List myImportedClasses

myImportedPackages

private final List myImportedPackages

myIsIncluded

boolean myIsIncluded

mySerializedForm

private final ESerializedForm mySerializedForm

mySerializationKind

private final int mySerializationKind

myModifiers

final int myModifiers

myContainingClass

final EClassDoc myContainingClass
Constructor Detail

EClassDoc

public EClassDoc(EDocBuilder builder,
                 com.sun.javadoc.ClassDoc classDoc)
Method Detail

isSerializable

public boolean isSerializable()
Return true if this class implements java.io.Serializable. Since java.io.Externalizable extends java.io.Serializable, Externalizable objects are also Serializable.


isExternalizable

public boolean isExternalizable()
Return true if this class implements java.io.Externalizable.


serializationMethods

public com.sun.javadoc.MethodDoc[] serializationMethods()
Return the serialization methods for this class.

Returns:
an array of EMethodDoc that represents the serialization methods for this class.

serializableFields

public com.sun.javadoc.FieldDoc[] serializableFields()
Return the Serializable fields of class.

Return either a list of default fields documented by serial tag
or return a single FieldDoc for serialPersistentField member. There should be a serialField tag for each Serializable field defined by an ObjectStreamField array component of serialPersistentField.

Returns:
an array of FieldDoc for the Serializable fields of this class.
See Also:
definesSerializableFields(), ESerialFieldTag

definesSerializableFields

public boolean definesSerializableFields()
Return true if Serializable fields are explicitly defined with the special class member serialPersistentFields.

See Also:
serializableFields(), ESerialFieldTag

isClass

public boolean isClass()
return true if this is a class, not an interface.

Overrides:
isClass in class EDoc
Returns:
true is it represents a class

isOrdinaryClass

public boolean isOrdinaryClass()
Return true if this is a ordinary class, not an exception, an error, or an interface.

Overrides:
isOrdinaryClass in class EDoc
Returns:
true is it represents a class

isInterface

public boolean isInterface()
Return true if this is an interface.

Overrides:
isInterface in class EDoc
Returns:
true is it represents a interface

isException

public boolean isException()
Return true if this is an exception class

Overrides:
isException in class EDoc
Returns:
true is it represents a exception

isError

public boolean isError()
Return true if this is an error class

Overrides:
isError in class EDoc
Returns:
true is it represents a error

isAbstract

public boolean isAbstract()
Return true if this class is abstract


isIncluded

public boolean isIncluded()
return true if this class is included in the active set.

Specified by:
isIncluded in class EDoc

containingPackage

public com.sun.javadoc.PackageDoc containingPackage()
Return the package that this class is contained in.


name

public String name()
Return the class name without qualifier as a String.
 Example:
  for java.util.Hashtable
  return Hashtable
 

Specified by:
name in class EDoc
Returns:
the name

typeName

public String typeName()
Return unqualified name of type excluding any dimension information.

For example, a two dimensional array of String returns 'String'.


qualifiedName

public String qualifiedName()
Return the qualified class name as a String.
 Example:
  for java.util.Hashtable
  return java.util.Hashtable
  if no qualifier, just return flat name
 


qualifiedTypeName

public String qualifiedTypeName()
Return qualified name of type excluding any dimension information.

For example, a two dimensional array of String returns 'java.lang.String'.


modifiers

public String modifiers()
Return the modifier string for this class. If it's an interface exclude 'abstract' keyword from the modifer string

Overrides:
modifiers in class EProgramElementDoc

superclass

public com.sun.javadoc.ClassDoc superclass()
Return the superclass of this class

Returns:
the EClassDoc for the superclass of this class, null if there is no superclass.

subclassOf

public boolean subclassOf(com.sun.javadoc.ClassDoc cd)
Test whether this class is a subclass of the specified class.

Parameters:
cd - the candidate superclass.
Returns:
true if cd is a superclass of this class.

interfaces

public com.sun.javadoc.ClassDoc[] interfaces()
Return interfaces implemented by this class or interfaces extended by this interface.

Returns:
An array of EClassDoc representing the interfaces. Return an empty array if there are no interfaces.

implementedInterfaces

public com.sun.javadoc.ClassDoc[] implementedInterfaces()
Deprecated. Use interfaces() - this method will go away by FCS.

Return interfaces implemented by this class or interfaces extended by this interface.

Returns:
An array of EClassDoc representing the interfaces. Return an empty array if there are no interfaces.

fields

public com.sun.javadoc.FieldDoc[] fields()
Return fields in class.

Returns:
an array of EFieldDoc for representing the visible fields in this class.

methods

public com.sun.javadoc.MethodDoc[] methods()
Return methods in class.

Returns:
an array of EMethodDoc for representing the visible methods in this class. Does not include constructors.

constructors

public com.sun.javadoc.ConstructorDoc[] constructors()
Return constructors in class.

Returns:
an array of EConstructorDoc for representing the visible constructors in this class.

innerClasses

public com.sun.javadoc.ClassDoc[] innerClasses()
Return inner classes within this class.

Returns:
an array of EClassDoc for representing the visible classes defined in this class. Anonymous and local classes are not included.

findClass

public com.sun.javadoc.ClassDoc findClass(String className)
Find a class within the context of this class. Search order: qualified name, in this class (inner), in this package, in the class imports, in the package imports. Return the EClassDoc if found, null if not found.


findMethod

public EMethodDoc findMethod(String methodName,
                             String[] paramTypeArray)

findMethod

public EMethodDoc findMethod(java.lang.reflect.Method method)

searchMethod

private EMethodDoc searchMethod(String methodName,
                                String[] paramTypeArray,
                                Set searchedClassSet)
Find a method in this class scope. Search order: this class, outerclasses, interfaces, superclasses. IMP: If see tag is defined in an inner class, which extends a super class and if outerclass and the super class have a visible field in common then Java compiler cribs about the ambiguity, but the following code will serach in the above given search order.

Parameters:
methodName - the unqualified name to search for.
paramTypeArray - the array of Strings for method parameter types.
searchedClassSet - the set of classes which are searched for methodName.
Returns:
the first EMethodDoc which matches, null if not found.

findConstructor

public EConstructorDoc findConstructor(String constrName,
                                       String[] paramTypeArray)
Find constructor in this class.

Parameters:
constrName - the unqualified name to search for.
paramTypeArray - the array of Strings for constructor parameters.
Returns:
the first EConstructorDoc which matches, null if not found.

findField

public EFieldDoc findField(String fieldName)

searchField

private EFieldDoc searchField(String fieldName,
                              Set searchedClassSet)
Find a field in this class scope. Search order: this class, outerclasses, interfaces, superclasses. IMP: If see tag is defined in an inner class, which extends a super class and if outerclass and the super class have a visible field in common then Java compiler cribs about the ambiguity, but the following code will serach in the above given search order.

Parameters:
fieldName - the unqualified name to search for.
searchedClassSet - the set of classes which are searched for fieldName.
Returns:
the first EFieldDoc which matches, null if not found.

importedClasses

public com.sun.javadoc.ClassDoc[] importedClasses()
Get the list of classes declared as imported. These are called "single-type-import declarations" in the JLS.

Returns:
an array of EClassDoc representing the imported classes.

importedPackages

public com.sun.javadoc.PackageDoc[] importedPackages()
Get the list of packages declared as imported. These are called "type-import-on-demand declarations" in the JLS.

Returns:
an array of EPackageDoc representing the imported packages.

thisClassDocImpl

EClassDoc thisClassDocImpl()
Overrides:
thisClassDocImpl in class EDoc

dimension

public String dimension()
Return the type's dimension information, as a string.

For example, a two dimensional array of String returns '[][]'.

In EClassDoc so that it implements TypeDoc interface, always returns empty string.


asClassDoc

public com.sun.javadoc.ClassDoc asClassDoc()
Return this type as a class. Array dimensions are ignored.

In EClassDoc so that it implements TypeDoc interface, always returns this.

Returns:
a EClassDoc if the type is a Class. Return null if it is a primitive type..

toString

public String toString()
Returns a string representation of the class.

Overrides:
toString in class EDoc
Returns:
the qualified class name

containingClass

public com.sun.javadoc.ClassDoc containingClass()
Get the containing class of this program element.

Returns:
a EClassDoc for this element's containing class. If this is a class with no outer class, return null.

modifierSpecifier

public int modifierSpecifier()
Get the modifier specifier integer.

See Also:
java.lang.reflect.Modifier

isPublic

public boolean isPublic()
Return true if this program element is public


isProtected

public boolean isProtected()
Return true if this program element is protected


isPrivate

public boolean isPrivate()
Return true if this program element is private


isPackagePrivate

public boolean isPackagePrivate()
Return true if this program element is package private


isStatic

public boolean isStatic()
Return true if this program element is static


isFinal

public boolean isFinal()
Return true if this program element is final


list

public static ArrayList list(Object[] array)

comment

EComment comment()
For lazy initialization of comment.


checkAccess

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


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.


key

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


generateKey

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

default is toString();


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

visible

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

position

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



comments?