src/share/classes/com/sun/mirror/declaration/ClassDeclaration.java

Print this page




  29 import java.util.Collection;
  30 
  31 import com.sun.mirror.type.ClassType;
  32 
  33 
  34 /**
  35  * Represents the declaration of a class.
  36  * For the declaration of an interface, see {@link InterfaceDeclaration}.
  37  * Provides access to information about the class, its members, and
  38  * its constructors.
  39  * Note that an {@linkplain EnumDeclaration enum} is a kind of class.
  40  *
  41  * <p> While a <tt>ClassDeclaration</tt> represents the <i>declaration</i>
  42  * of a class, a {@link ClassType} represents a class <i>type</i>.
  43  * See {@link TypeDeclaration} for more on this distinction.
  44  *
  45  * <p> {@link com.sun.mirror.util.DeclarationFilter}
  46  * provides a simple way to select just the items of interest
  47  * when a method returns a collection of declarations.
  48  *





  49  * @author Joseph D. Darcy
  50  * @author Scott Seligman
  51  *
  52  * @see ClassType
  53  * @since 1.5
  54  */
  55 

  56 public interface ClassDeclaration extends TypeDeclaration {
  57 
  58     /**
  59      * Returns the class type directly extended by this class.
  60      * The only class with no superclass is <tt>java.lang.Object</tt>,
  61      * for which this method returns null.
  62      *
  63      * @return the class type directly extended by this class, or null
  64      * if there is none
  65      */
  66     ClassType getSuperclass();
  67 
  68     /**
  69      * Returns the constructors of this class.
  70      * This includes the default constructor if this class has
  71      * no constructors explicitly declared.
  72      *
  73      * @return the constructors of this class
  74      *
  75      * @see com.sun.mirror.util.DeclarationFilter


  29 import java.util.Collection;
  30 
  31 import com.sun.mirror.type.ClassType;
  32 
  33 
  34 /**
  35  * Represents the declaration of a class.
  36  * For the declaration of an interface, see {@link InterfaceDeclaration}.
  37  * Provides access to information about the class, its members, and
  38  * its constructors.
  39  * Note that an {@linkplain EnumDeclaration enum} is a kind of class.
  40  *
  41  * <p> While a <tt>ClassDeclaration</tt> represents the <i>declaration</i>
  42  * of a class, a {@link ClassType} represents a class <i>type</i>.
  43  * See {@link TypeDeclaration} for more on this distinction.
  44  *
  45  * <p> {@link com.sun.mirror.util.DeclarationFilter}
  46  * provides a simple way to select just the items of interest
  47  * when a method returns a collection of declarations.
  48  *
  49  * @deprecated All components of this API have been superseded by the
  50  * standardized annotation processing API.  The replacement for the
  51  * functionality of this interface is included in {@link
  52  * javax.lang.model.element.TypeElement}.
  53  *
  54  * @author Joseph D. Darcy
  55  * @author Scott Seligman
  56  *
  57  * @see ClassType
  58  * @since 1.5
  59  */
  60 @Deprecated
  61 @SuppressWarnings("deprecation")
  62 public interface ClassDeclaration extends TypeDeclaration {
  63 
  64     /**
  65      * Returns the class type directly extended by this class.
  66      * The only class with no superclass is <tt>java.lang.Object</tt>,
  67      * for which this method returns null.
  68      *
  69      * @return the class type directly extended by this class, or null
  70      * if there is none
  71      */
  72     ClassType getSuperclass();
  73 
  74     /**
  75      * Returns the constructors of this class.
  76      * This includes the default constructor if this class has
  77      * no constructors explicitly declared.
  78      *
  79      * @return the constructors of this class
  80      *
  81      * @see com.sun.mirror.util.DeclarationFilter