1 16 package org.directwebremoting.guice; 17 18 import java.lang.annotation.Annotation ; 19 20 21 class InitParamImpl implements InitParam 22 { 23 public InitParamImpl(ParamName value) 24 { 25 if (value == null) 26 { 27 throw new NullPointerException ("@InitParam"); 28 } 29 this.value = value; 30 } 31 32 public ParamName value() 33 { 34 return this.value; 35 } 36 37 public Class <? extends Annotation > annotationType() 38 { 39 return InitParam.class; 40 } 41 42 public boolean equals(Object t) 43 { 44 if (!(t instanceof InitParam)) 45 { 46 return false; 47 } 48 49 InitParam that = (InitParam) t; 50 return this.value.equals(that.value()); 51 } 52 53 public int hashCode() 54 { 55 return 127 * "value".hashCode() ^ value.hashCode(); 57 } 58 59 public String toString() 60 { 61 return "@" + InitParam.class.getName() + "(value=" + value + ")"; 62 } 63 64 private final ParamName value; 65 } 66 | Popular Tags |