net.cscott.sinjdoc

Interface ProgramElementDoc

public interface ProgramElementDoc extends Doc

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

Version: $Id: ProgramElementDoc.java,v 1.6 2003/06/25 01:51:52 cananian Exp $

Author: C. Scott Ananian (cscott@cscott.net)

See Also: com.sun.javadoc.ProgramElementDoc

Method Summary
StringcanonicalName()
Return the fully-qualified name of this program element.
ClassDoccontainingClass()
Return the containing class of this program element.
PackageDoccontainingPackage()
Return the package that this program element is contained in.
booleanisFinal()
Return true if this program element is final.
booleanisPackage()
Return true if this program element is package private.
booleanisPrivate()
Return true if this program element is private.
booleanisProtected()
Return true if this program element is protected.
booleanisPublic()
Return true if this program element is public.
booleanisStatic()
Return true if this program element is static.
Stringmodifiers()
Get the modifiers string.
intmodifierSpecifier()
Get the modifier specifier integer.

Method Detail

canonicalName

public String canonicalName()
Return the fully-qualified name of this program element. For example, for the class java.util.Hashtable, return "java.util.Hashtable". For the method bar(String str, int i) in the class Foo in the unnamed package, return "Foo.bar(java.lang.String,int)" (where all parameter types are also given their canonical names). See section 6.7 of the JLS for the difference between canonical and fully-qualified names.

containingClass

public ClassDoc containingClass()
Return the containing class of this program element. If this is a class item and there is no outer class, return null.

containingPackage

public PackageDoc containingPackage()
Return the package that this program element is contained in. If in the unnamed package, then the PackageDoc returned will have the name "".

isFinal

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

isPackage

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

isPrivate

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

isProtected

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

isPublic

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

isStatic

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

modifiers

public String modifiers()
Get the modifiers string. For example, for public abstract int foo() return "public abstract".

modifierSpecifier

public int modifierSpecifier()
Get the modifier specifier integer.

See Also: java.lang.reflect.Modifier

Copyright © 2003 C. Scott Ananian