package jfun.yan.xml.nut;
import java.lang.reflect.Method;
import jfun.util.SerializableMethod;
/**
* Method with 1 and only 1 parameter.
* <p>
* @author Ben Yu
* Dec 28, 2005 5:23:00 PM
*/
final class Method1 implements java.io.Serializable {
private final Class param_type;
private final SerializableMethod mtd;
public boolean equals(Object obj) {
if(obj instanceof Method1){
final Method1 other = (Method1)obj;
return param_type.equals(other.param_type) && mtd.equals(other.mtd);
}
else return false;
}
public int hashCode() {
return mtd.hashCode();
}
public String toString() {
return mtd.toString();
}
public Method getMethod() {
return mtd.getMethod();
}
public Class getParameterType() {
return param_type;
}
Method1(Method mtd, Class param_type) {
this.mtd = new SerializableMethod(mtd);
this.param_type = param_type;
}
}