harpoon.ClassFile
Interface HTypeVariable

All Superinterfaces:
HType
All Known Subinterfaces:
HClassTypeVariable, HMethodTypeVariable

public interface HTypeVariable
extends HType

The HTypeVariable interface represents a type variable declared as a formal parameter to a generic class, interface, or method. Example: A in Collection<A>. This interface embodies commonality among all type variables. Every actual type variable supports one of the two subinterfaces HMethodTypeVariable or HClassTypeVariable.

Note that implementations of this interface are free to return distinct objects for the same type variable; the identity of an objects implementing this interface may not be used to test for identity among the type variables they represent. (In other words, this interface does not extend ReferenceUnique.)

Version:
$Id: HTypeVariable.java,v 1.1 2003/03/18 02:27:02 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
TypeVariable

Method Summary
 HType[] getBounds()
          Returns an array with HType objects representing the declared bound(s) of the type variable represented by this object.
 String getName()
          Returns the name of this type variable.
 

Method Detail

getBounds

HType[] getBounds()
Returns an array with HType objects representing the declared bound(s) of the type variable represented by this object. If no bound is explicitly declared, than the array contains one element, a HClass object representing java.lang.Object.

Returns:
the declared bounds for this type variable.

getName

String getName()
Returns the name of this type variable.

Returns:
the name of the type variable represented by this object.