src/share/classes/com/sun/mirror/type/TypeMirror.java

Print this page




  26 package com.sun.mirror.type;
  27 
  28 
  29 import com.sun.mirror.declaration.Declaration;
  30 import com.sun.mirror.util.Types;
  31 import com.sun.mirror.util.TypeVisitor;
  32 
  33 
  34 /**
  35  * Represents a type in the Java programming language.
  36  * Types include primitive types, class and interface types, array
  37  * types, and type variables.  Wildcard type arguments, and the
  38  * pseudo-type representing the type of <tt>void</tt>, are represented
  39  * by type mirrors as well.
  40  *
  41  * <p> Types may be compared using the utility methods in
  42  * {@link Types}.
  43  * There is no guarantee that any particular type will
  44  * always be represented by the same object.
  45  *





  46  * @author Joseph D. Darcy
  47  * @author Scott Seligman
  48  *
  49  * @see Declaration
  50  * @see Types
  51  * @since 1.5
  52  */
  53 

  54 public interface TypeMirror {
  55 
  56     /**
  57      * Returns a string representation of this type.
  58      * Any names embedded in the expression are qualified.
  59      *
  60      * @return a string representation of this type
  61      */
  62     String toString();
  63 
  64     /**
  65      * Tests whether two types represent the same type.
  66      *
  67      * @param obj the object to be compared with this type
  68      * @return <tt>true</tt> if the specified object represents the same
  69      *          type as this.
  70      */
  71     boolean equals(Object obj);
  72 
  73     /**


  26 package com.sun.mirror.type;
  27 
  28 
  29 import com.sun.mirror.declaration.Declaration;
  30 import com.sun.mirror.util.Types;
  31 import com.sun.mirror.util.TypeVisitor;
  32 
  33 
  34 /**
  35  * Represents a type in the Java programming language.
  36  * Types include primitive types, class and interface types, array
  37  * types, and type variables.  Wildcard type arguments, and the
  38  * pseudo-type representing the type of <tt>void</tt>, are represented
  39  * by type mirrors as well.
  40  *
  41  * <p> Types may be compared using the utility methods in
  42  * {@link Types}.
  43  * There is no guarantee that any particular type will
  44  * always be represented by the same object.
  45  *
  46  * @deprecated All components of this API have been superseded by the
  47  * standardized annotation processing API.  The replacement for the
  48  * functionality of this interface is {@link
  49  * javax.lang.model.type.TypeMirror}.
  50  *
  51  * @author Joseph D. Darcy
  52  * @author Scott Seligman
  53  *
  54  * @see Declaration
  55  * @see Types
  56  * @since 1.5
  57  */
  58 @Deprecated
  59 @SuppressWarnings("deprecation")
  60 public interface TypeMirror {
  61 
  62     /**
  63      * Returns a string representation of this type.
  64      * Any names embedded in the expression are qualified.
  65      *
  66      * @return a string representation of this type
  67      */
  68     String toString();
  69 
  70     /**
  71      * Tests whether two types represent the same type.
  72      *
  73      * @param obj the object to be compared with this type
  74      * @return <tt>true</tt> if the specified object represents the same
  75      *          type as this.
  76      */
  77     boolean equals(Object obj);
  78 
  79     /**