src/share/classes/com/sun/mirror/util/Types.java

Print this page




  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22  * CA 95054 USA or visit www.sun.com if you need additional information or
  23  * have any questions.
  24  */
  25 
  26 package com.sun.mirror.util;
  27 
  28 
  29 import java.util.Collection;
  30 
  31 import com.sun.mirror.declaration.*;
  32 import com.sun.mirror.type.*;
  33 
  34 
  35 /**
  36  * Utility methods for operating on types.
  37  *





  38  * @author Joseph D. Darcy
  39  * @author Scott Seligman
  40  * @since 1.5
  41  */
  42 

  43 public interface Types {
  44 
  45     /**
  46      * Tests whether one type is a subtype of the another.
  47      * Any type is considered to be a subtype of itself.
  48      *
  49      * @param t1  the first type
  50      * @param t2  the second type
  51      * @return <tt>true</tt> if and only if the first type is a subtype
  52      *          of the second
  53      */
  54     boolean isSubtype(TypeMirror t1, TypeMirror t2);
  55 
  56     /**
  57      * Tests whether one type is assignable to another.
  58      *
  59      * @param t1  the first type
  60      * @param t2  the second type
  61      * @return <tt>true</tt> if and only if the first type is assignable
  62      *          to the second




  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22  * CA 95054 USA or visit www.sun.com if you need additional information or
  23  * have any questions.
  24  */
  25 
  26 package com.sun.mirror.util;
  27 
  28 
  29 import java.util.Collection;
  30 
  31 import com.sun.mirror.declaration.*;
  32 import com.sun.mirror.type.*;
  33 
  34 
  35 /**
  36  * Utility methods for operating on types.
  37  *
  38  * @deprecated All components of this API have been superseded by the
  39  * standardized annotation processing API.  The replacement for the
  40  * functionality of this interface is {@link
  41  * javax.lang.model.util.Types}.
  42  *
  43  * @author Joseph D. Darcy
  44  * @author Scott Seligman
  45  * @since 1.5
  46  */
  47 @Deprecated
  48 @SuppressWarnings("deprecation")
  49 public interface Types {
  50 
  51     /**
  52      * Tests whether one type is a subtype of the another.
  53      * Any type is considered to be a subtype of itself.
  54      *
  55      * @param t1  the first type
  56      * @param t2  the second type
  57      * @return <tt>true</tt> if and only if the first type is a subtype
  58      *          of the second
  59      */
  60     boolean isSubtype(TypeMirror t1, TypeMirror t2);
  61 
  62     /**
  63      * Tests whether one type is assignable to another.
  64      *
  65      * @param t1  the first type
  66      * @param t2  the second type
  67      * @return <tt>true</tt> if and only if the first type is assignable
  68      *          to the second