站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.4.1, Java 2 SDK 英文文档

ProgramElementDoc (Doclet API) - JDK 5 Documentation v1.4.1, Java 2 SDK 英文文档

Doclet API

com.sun.javadoc
Interface ProgramElementDoc

All Superinterfaces:
Comparable, Doc
All Known Subinterfaces:
ClassDoc, ConstructorDoc, ExecutableMemberDoc, FieldDoc, MemberDoc, MethodDoc

public interface ProgramElementDoc
extends Doc

Represents a java program element: class, interface, field, constructor, or method. This is an abstract class dealing with information common to these elements.

See Also:
MemberDoc, ClassDoc

Method Summary
 ClassDoc containingClass()
          Get the containing class of this program element.
 PackageDoc containingPackage()
          Get the package that this program element is contained in.
 boolean isFinal()
          Return true if this program element is final
 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 isStatic()
          Return true if this program element is static
 String modifiers()
          Get modifiers string.
 int modifierSpecifier()
          Get the modifier specifier integer.
 String qualifiedName()
          Get the fully qualified name.
 
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags
 

Method Detail

containingClass

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

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

containingPackage

public PackageDoc containingPackage()
Get the package that this program element is contained in.

Returns:
a PackageDoc for this element containing package. If in the unnamed package, this PackageDoc will have the name "".

qualifiedName

public String qualifiedName()
Get the fully qualified name.
 Example:
  for the class java.util.Hashtable, return:
       java.util.Hashtable
  for the method bar() in class Foo in the unnamed package, return:
       Foo.bar()
 

Returns:
the qualified name of the program element as a String.

modifierSpecifier

public int modifierSpecifier()
Get the modifier specifier integer.

See Also:
java.lang.reflect.Modifier

modifiers

public String modifiers()
Get modifiers string.
 Example, for:
   public abstract int foo() { ... }
 modifiers() would return:
   'public abstract'
 


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


Doclet API

Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.