1 8 9 15 package jfun.yan; 16 17 23 final class ConstComponentBinder implements ComponentBinder { 24 private final Creator c; 25 26 ConstComponentBinder(final Creator c) { 27 this.c = c; 28 } 29 public Creator bind(Object o){return c;} 30 public Verifiable verify(Class t){ 31 return c; 32 } 33 public Class bindType(Class t){ 34 return c.getType(); 35 } 36 public boolean equals(Object obj) { 37 if(obj instanceof ConstComponentBinder){ 38 final ConstComponentBinder other = (ConstComponentBinder)obj; 39 return c.equals(other.c); 40 } 41 else return false; 42 } 43 public int hashCode() { 44 return c.hashCode(); 45 } 46 public String toString() { 47 return c.toString(); 48 } 49 } 50 | Popular Tags |