Package jfun.yan.xml.nut

Source Code of jfun.yan.xml.nut.Method1

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;
  }
 
}
TOP

Related Classes of jfun.yan.xml.nut.Method1

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.