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