1 7 8 package java.lang.annotation; 9 import java.lang.reflect.Method ; 10 11 19 public class AnnotationTypeMismatchException extends RuntimeException { 20 23 private final Method element; 24 25 30 private final String foundType; 31 32 41 public AnnotationTypeMismatchException(Method element, String foundType) { 42 super("Incorrectly typed data found for annotation element " + element 43 + " (Found data of type " + foundType + ")"); 44 this.element = element; 45 this.foundType = foundType; 46 } 47 48 53 public Method element() { 54 return this.element; 55 } 56 57 64 public String foundType() { 65 return this.foundType; 66 } 67 } 68 | Popular Tags |