org.apache.ws.jaxme.js.pattern
Class MethodKey

java.lang.Object
  extended by org.apache.ws.jaxme.js.pattern.MethodKey
All Implemented Interfaces:
java.lang.Comparable

public class MethodKey
extends java.lang.Object
implements java.lang.Comparable

This class is a key for generated methods. The main purpose is to determine, whether some method is present in more than one interface. In that case we have to ensure, that it is generated only once.


Constructor Summary
MethodKey(JavaMethod pMethod)
          Creates a new instance of MethodKey.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares this GeneratedMethod to the given GeneratedMethod o.
 boolean equals(java.lang.Object o)
          Returns whether this method key equals the object o.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodKey

public MethodKey(JavaMethod pMethod)
Creates a new instance of MethodKey.

Method Detail

equals

public boolean equals(java.lang.Object o)

Returns whether this method key equals the object o. This is the case, if o != null, o instanceof MethodKey, and compareTo(o) == 0.

Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(java.lang.Object o)

Compares this GeneratedMethod to the given GeneratedMethod o. More precise, compares the method name, the number of parameters and the class names of the parameters, in that order.

Specified by:
compareTo in interface java.lang.Comparable
Throws:
java.lang.ClassCastException - The object o is not an instance of MethodKey.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object