1 8 9 15 package jfun.yan; 16 17 25 final class MethodNameBinder implements ComponentBinder { 26 public Verifiable verify(Class type) { 27 return Components.fun( 28 Functions.method(type, null, mname, suppress_security)); 29 } 30 public Creator bind(Object v){ 31 return Components.fun( 32 Functions.method(v, mname, suppress_security)); 33 } 34 public Class bindType(Class t){ 35 return null; 36 } 37 private final String mname; 38 private final boolean suppress_security; 39 MethodNameBinder(final String mname, boolean suppress_security) { 40 this.mname = mname; 41 this.suppress_security = suppress_security; 42 } 43 44 public boolean equals(Object obj) { 45 if(obj instanceof MethodNameBinder){ 46 final MethodNameBinder other = (MethodNameBinder)obj; 47 return suppress_security==other.suppress_security&&mname.equals(other.mname); 48 } 49 else return false; 50 } 51 public int hashCode() { 52 return mname.hashCode(); 53 } 54 public String toString() { 55 return mname.toString(); 56 } 57 } 58 | Popular Tags |