harpoon.ClassFile
Interface HConstructor

All Superinterfaces:
Comparable<HMember>, HMember, HMethod

public interface HConstructor
extends HMethod

An HConstructor provides information about a single constructor for a class.

Version:
$Id: HConstructor.java,v 1.11 2002/04/10 03:04:15 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
HMethod, HMember, HClass

Nested Class Summary
 
Nested classes/interfaces inherited from interface harpoon.ClassFile.HMember
HMember.MemberComparator
 
Field Summary
static ArrayFactory<HConstructor> arrayFactory
          Array factory: returns new HConstructor[].
 
Fields inherited from interface harpoon.ClassFile.HMember
memberComparator
 
Method Summary
 String getName()
          Returns the name of this constructor, as a string.
 int hashCode()
          Returns a hashcode for this Constructor.
 String toString()
          Return a string describing this Constructor.
 
Methods inherited from interface harpoon.ClassFile.HMethod
equals, getDeclaringClass, getDescriptor, getExceptionTypes, getGenericParameterTypes, getGenericReturnType, getModifiers, getMutator, getParameterNames, getParameterTypes, getReturnType, getTypeParameters, isInterfaceMethod, isStatic, isSynthetic
 
Methods inherited from interface harpoon.ClassFile.HMember
compareTo
 

Field Detail

arrayFactory

static final ArrayFactory<HConstructor> arrayFactory
Array factory: returns new HConstructor[].

Method Detail

getName

String getName()
Returns the name of this constructor, as a string. This is always the string "<init>".

Specified by:
getName in interface HMember
Specified by:
getName in interface HMethod

hashCode

int hashCode()
Returns a hashcode for this Constructor. The hashcode is computed as the exclusive-or of the hashcodes for the underlying constructor's declaring class and the constructor's descriptor string.

Specified by:
hashCode in interface HMember
Overrides:
hashCode in class Object

toString

String toString()
Return a string describing this Constructor. The string is formatted as: the constructor access modifiers, if any, followed by the fully-qualified name of the declaring class, followed by a parenthesized, comma-separated list of the constructor's formal parameter types. For example:

public java.util.Hashtable(int,float)

The only possible modifiers for constructors are the access modifiers public, protected, or private. Only one of these may appear, or none if the constructor has default (package) access.

Specified by:
toString in interface HMethod
Overrides:
toString in class Object