1 cananian 1.9.2.3  // HConstructor.java, created Sat Aug  1  4:54:58 1998 by cananian
 2 cananian 1.6      // Copyright (C) 1998 C. Scott Ananian <cananian@alumni.princeton.edu>
 3 cananian 1.6      // 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.9.2.1  import harpoon.Util.ArrayFactory;
 7 cananian 1.1      
 8 cananian 1.1      /**
 9 cananian 1.9.2.2   * An <code>HConstructor</code> provides information about a single
10 cananian 1.1       * constructor for a class.
11 cananian 1.2       *
12 cananian 1.4       * @author  C. Scott Ananian <cananian@alumni.princeton.edu>
13 cananian 1.11      * @version $Id: HConstructor.java,v 1.11 2002/04/10 03:04:15 cananian Exp $
14 cananian 1.1       * @see HMethod
15 cananian 1.1       * @see HMember
16 cananian 1.1       * @see HClass
17 cananian 1.1       */
18 cananian 1.9.2.4  public interface HConstructor extends HMethod {
19 cananian 1.1        /**
20 cananian 1.1         * Returns the name of this constructor, as a string.  This is always
21 cananian 1.1         * the string "<code>&lt;init&gt;</code>".
22 cananian 1.1         */
23 cananian 1.9.2.4    public String getName();
24 cananian 1.1      
25 cananian 1.1        /**
26 cananian 1.9         * Returns a hashcode for this Constructor.  The hashcode is computed as
27 cananian 1.9         * the exclusive-or of the hashcodes for the underlying constructor's 
28 cananian 1.9         * declaring class and the constructor's descriptor string.
29 cananian 1.1         */
30 cananian 1.9.2.4    public int hashCode();
31 cananian 1.1      
32 cananian 1.1        /**
33 cananian 1.1         * Return a string describing this Constructor.  The string is formatted
34 cananian 1.9.2.2     * as: the constructor access modifiers, if any, followed by the
35 cananian 1.1         * fully-qualified name of the declaring class, followed by a 
36 cananian 1.1         * parenthesized, comma-separated list of the constructor's formal
37 cananian 1.1         * parameter types.  For example: <p>
38 cananian 1.1         * <DL><DD><CODE>public java.util.Hashtable(int,float)</CODE></DL><p>
39 cananian 1.1         * The only possible modifiers for constructors are the access modifiers
40 cananian 1.1         * <code>public</code>, <code>protected</code>, or <code>private</code>.
41 cananian 1.1         * Only one of these may appear, or none if the constructor has default
42 cananian 1.1         * (<code>package</code>) access.
43 cananian 1.1         */
44 cananian 1.9.2.4    public String toString();
45 cananian 1.1      
46 cananian 1.9.2.1    /** Array factory: returns new <code>HConstructor[]</code>. */
47 cananian 1.10.2.1   public static final ArrayFactory<HConstructor> arrayFactory =
48 cananian 1.9.2.4      Factories.hconstructorArrayFactory;
49 cananian 1.1      }