1 cananian 1.1 // HParameterizedType.java, created Mon Mar 17 20:19:39 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>HParameterizedType</code> interface describes the behavior 8 cananian 1.1 * of parameterized types such as <code>Collection<Applet></code> or 9 cananian 1.1 * <code>HashMap<String, Class></code>. 10 cananian 1.1 * <p> 11 cananian 1.1 * Note that implementations of this interface are free to return 12 cananian 1.1 * distinct objects for the same parameterized type; the identity of 13 cananian 1.1 * an objects implementing this interface may not be used to test for identity 14 cananian 1.1 * among the parameterized types they represent. (In other words, 15 cananian 1.1 * this interface does not extend <code>ReferenceUnique</code>.) 16 cananian 1.1 * 17 cananian 1.1 * @author C. Scott Ananian <cananian@alumni.princeton.edu> 18 cananian 1.1 * @version $Id: HParameterizedType.java,v 1.1 2003/03/18 02:27:02 cananian Exp $ 19 cananian 1.1 * @see java.lang.reflect.ParameterizedType 20 cananian 1.1 */ 21 cananian 1.1 public interface HParameterizedType extends HType { 22 cananian 1.1 /** 23 cananian 1.1 * Returns an array of objects representing the type arguments used 24 cananian 1.1 * to instantiate this parameterized type. The length of the array 25 cananian 1.1 * is the exact number of type arguments to this parameterized type, 26 cananian 1.1 * hence it is always at least 1. 27 cananian 1.1 * @return the actual type arguments to the parameterized type 28 cananian 1.1 * represented by this object. 29 cananian 1.1 */ 30 cananian 1.1 public HType[] getActualTypeArguments(); 31 cananian 1.1 /** 32 cananian 1.1 * Returns an <code>HClass</code> object representing the generic 33 cananian 1.1 * class or interface that this parameterized type instantiates. 34 cananian 1.1 * @return the class of interface that this parameterized type 35 cananian 1.1 * instantiates. 36 cananian 1.1 */ 37 cananian 1.1 public HClass getRawClass(); 38 cananian 1.1 }