Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Interface com.sun.javadoc.ClassDoc


public abstract interface ClassDoc
extends ProgramElementDoc, Type
Represents a java class and provides access to information about the class, the class' comment and tags, and the members of the class. A ClassDoc only exists if it was processed in this run of javadoc. References to classes which may or may not have been processed in this run are referred to using Type (which can be converted to ClassDoc, if possible).

Since:
JDK1.2
See Also:
Type

Fields inherited from class java.io.Serializable
serialVersionUID
 
Fields inherited from class java.io.Serializable
serialVersionUID
 
Method Summary
 ConstructorDoc[] constructors()
          Return constructors in class.
 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.
 FieldDoc[] fields()
          Return fields in class.
 ClassDoc findClass(java.lang.String className)
          Find a class within the context of this class.
 ClassDoc[] implementedInterfaces()
          Deprecated. Use interfaces() - this method will go away by FCS.
 ClassDoc[] importedClasses()
          Get the list of classes declared as imported.
 PackageDoc[] importedPackages()
          Get the list of packages declared as imported.
 ClassDoc[] innerClasses()
          Return inner classes within this class.
 ClassDoc[] interfaces()
          Return interfaces implemented by this class or interfaces extended by this interface.
 boolean isAbstract()
          Return true if this class is abstract
 boolean isExternalizable()
          Return true if this class implements java.io.
 boolean isSerializable()
          Return true if this class implements java.io.
 MethodDoc[] methods()
          Return methods in class.
 java.lang.String qualifiedName()
          Return the qualified class name as a String.
 FieldDoc[] serializableFields()
          Return the Serializable fields of class.
 MethodDoc[] serializationMethods()
          Return the serialization methods for this class.
 boolean subclassOf(ClassDoc cd)
          Test whether this class is a subclass of the specified class.
 ClassDoc superclass()
          Return the superclass of this class
 
Methods inherited from interface com.sun.javadoc.ProgramElementDoc
containingClass, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifierSpecifier, modifiers
 
Methods inherited from interface com.sun.javadoc.Type
asClassDoc, dimension, qualifiedTypeName, toString, typeName
 
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, seeTags, setRawCommentText, tags, tags
 

Method Detail

isAbstract

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

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 MethodDoc[] serializationMethods()
Return the serialization methods for this class.
Returns:
an array of MethodDoc that represents the serialization methods for this class.

serializableFields

public 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.

See Also:
definesSerializableFields(), SerialFieldTag

definesSerializableFields

public boolean definesSerializableFields()
Return true if Serializable fields are explicitly defined with the special class member serialPersistentFields.
See Also:
serializableFields(), SerialFieldTag

containingPackage

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

qualifiedName

public java.lang.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
 

superclass

public ClassDoc superclass()
Return the superclass of this class
Returns:
the ClassDoc for the superclass of this class, null if there is no superclass.

subclassOf

public boolean subclassOf(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 ClassDoc[] interfaces()
Return interfaces implemented by this class or interfaces extended by this interface.
Returns:
An array of ClassDoc representing the interfaces. Return an empty array if there are no interfaces.

implementedInterfaces

public 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 ClassDoc representing the interfaces. Return an empty array if there are no interfaces.

fields

public FieldDoc[] fields()
Return fields in class.
Returns:
an array of FieldDoc for representing the visible fields in this class.

methods

public MethodDoc[] methods()
Return methods in class.
Returns:
an array of MethodDoc for representing the visible methods in this class. Does not include constructors.

constructors

public ConstructorDoc[] constructors()
Return constructors in class.
Returns:
an array of ConstructorDoc for representing the visible constructors in this class.

innerClasses

public ClassDoc[] innerClasses()
Return inner classes within this class.
Returns:
an array of ClassDoc for representing the visible classes defined in this class. Anonymous and local classes are not included.

findClass

public ClassDoc findClass(java.lang.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 ClassDoc if found, null if not found.

importedClasses

public ClassDoc[] importedClasses()
Get the list of classes declared as imported. These are called "single-type-import declarations" in the JLS.
Returns:
an array of ClassDoc representing the imported classes.

importedPackages

public 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 PackageDoc representing the imported packages.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD