harpoon.ClassFile
Interface HMember

All Superinterfaces:
Comparable<HMember>
All Known Subinterfaces:
HConstructor, HField, HInitializer, HMethod

public interface HMember
extends Comparable<HMember>

HMember is an interface that reflects identifying information about a single member (a field or a method) or a constructor.

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

Nested Class Summary
static class HMember.MemberComparator
          Implementation of java.util.Comparator for objects implementing HMember, for consistency among implementations.
 
Field Summary
static ArrayFactory<HMember> arrayFactory
          Array factory: returns new HMember[].
static Comparator<HMember> memberComparator
           
 
Method Summary
 int compareTo(HMember o)
          Compares two HMembers lexicographically; first by declaring class, then by name, and lastly by descriptor.
 HClass getDeclaringClass()
          Returns the HClass object representing the class or interface that declares the member or constructor represented by this HMember.
 String getDescriptor()
          Returns the type descriptor for this member.
 int getModifiers()
          Returns the Java language modifiers for the member of constructor represented by this HMember, as an integer.
 String getName()
          Returns the simple name of the underlying member or constructor represented by this HMember.
 int hashCode()
          Returns a hashcode for this HMember.
 boolean isSynthetic()
          Indicates whether this field or method is 'real' or if it has been synthesized by the compiler in order to implement scoping of inner classes.
 

Field Detail

memberComparator

static final Comparator<HMember> memberComparator

arrayFactory

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

Method Detail

getDeclaringClass

HClass getDeclaringClass()
Returns the HClass object representing the class or interface that declares the member or constructor represented by this HMember.


getDescriptor

String getDescriptor()
Returns the type descriptor for this member.


getName

String getName()
Returns the simple name of the underlying member or constructor represented by this HMember.


getModifiers

int getModifiers()
Returns the Java language modifiers for the member of constructor represented by this HMember, as an integer. The Modifier class should be used to decode the modifiers in the integer.

See Also:
Modifier

hashCode

int hashCode()
Returns a hashcode for this HMember. This is computed as the exclusive-or of the hashcodes for the underlying member's declaring class, name, and descriptor string.

Overrides:
hashCode in class Object

isSynthetic

boolean isSynthetic()
Indicates whether this field or method is 'real' or if it has been synthesized by the compiler in order to implement scoping of inner classes.


compareTo

int compareTo(HMember o)
Compares two HMembers lexicographically; first by declaring class, then by name, and lastly by descriptor.

Specified by:
compareTo in interface Comparable<HMember>