1 cananian 1.1 // HTypeVariable.java, created Mon Mar 17 20:04:41 2003 by cananian
 2 cananian 1.1 // Copyright (C) 2003 C. Scott Ananian <cananian@alumni.princeton.edu>
 3 cananian 1.1 // Licensed under the terms of the GNU GPL; see COPYING for details.
 4 cananian 1.1 package harpoon.ClassFile;
 5 cananian 1.1 
 6 cananian 1.1 /**
 7 cananian 1.1  * The <code>HTypeVariable</code> interface represents a type variable
 8 cananian 1.1  * declared as a formal parameter to a generic class, interface, or
 9 cananian 1.1  * method.  Example: <code>A</code> in <code>Collection&lt;A&gt;</code>.
10 cananian 1.1  * This interface embodies commonality among all type variables.
11 cananian 1.1  * Every actual type variable supports one of the two subinterfaces
12 cananian 1.1  * <code>HMethodTypeVariable</code> or <code>HClassTypeVariable</code>.
13 cananian 1.1  * <p>
14 cananian 1.1  * Note that implementations of this interface are free to return
15 cananian 1.1  * distinct objects for the same type variable; the identity of
16 cananian 1.1  * an objects implementing this interface may not be used to test for
17 cananian 1.1  * identity among the type variables they represent. (In other words,
18 cananian 1.1  * this interface does not extend <code>ReferenceUnique</code>.)
19 cananian 1.1  * 
20 cananian 1.1  * @author  C. Scott Ananian <cananian@alumni.princeton.edu>
21 cananian 1.1  * @version $Id: HTypeVariable.java,v 1.1 2003/03/18 02:27:02 cananian Exp $
22 cananian 1.1  * @see java.lang.reflect.TypeVariable
23 cananian 1.1  */
24 cananian 1.1 public interface HTypeVariable extends HType {
25 cananian 1.1     /**
26 cananian 1.1      * Returns an array with <code>HType</code> objects representing the
27 cananian 1.1      * declared bound(s) of the type variable represented by this object.
28 cananian 1.1      * If no bound is explicitly declared, than the array contains one
29 cananian 1.1      * element, a <code>HClass</code> object representing
30 cananian 1.1      * <code>java.lang.Object</code>.
31 cananian 1.1      * @return the declared bounds for this type variable.
32 cananian 1.1      */
33 cananian 1.1     public HType[] getBounds();
34 cananian 1.1     /**
35 cananian 1.1      * Returns the name of this type variable.
36 cananian 1.1      * @return the name of the type variable represented by this object.
37 cananian 1.1      */
38 cananian 1.1     public String getName();
39 cananian 1.1 }