< prev index next >

src/java.base/share/classes/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java

Print this page




  39     private final String foundType;
  40 
  41     /**
  42      * It turns out to be convenient to construct these proxies in
  43      * two stages.  Since this is a private implementation class, we
  44      * permit ourselves this liberty even though it's normally a very
  45      * bad idea.
  46      */
  47     AnnotationTypeMismatchExceptionProxy(String foundType) {
  48         this.foundType = foundType;
  49     }
  50 
  51     AnnotationTypeMismatchExceptionProxy setMember(Method member) {
  52         this.member = member;
  53         return this;
  54     }
  55 
  56     protected RuntimeException generateException() {
  57         return new AnnotationTypeMismatchException(member, foundType);
  58     }





  59 }


  39     private final String foundType;
  40 
  41     /**
  42      * It turns out to be convenient to construct these proxies in
  43      * two stages.  Since this is a private implementation class, we
  44      * permit ourselves this liberty even though it's normally a very
  45      * bad idea.
  46      */
  47     AnnotationTypeMismatchExceptionProxy(String foundType) {
  48         this.foundType = foundType;
  49     }
  50 
  51     AnnotationTypeMismatchExceptionProxy setMember(Method member) {
  52         this.member = member;
  53         return this;
  54     }
  55 
  56     protected RuntimeException generateException() {
  57         return new AnnotationTypeMismatchException(member, foundType);
  58     }
  59 
  60     @Override
  61     public String memberToString() {
  62         return "/* Type mismatch! \"" + foundType + "\" */" ;
  63     }
  64 }
< prev index next >