< prev index next >

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

Print this page




  29 /**
  30  * ExceptionProxy for TypeNotPresentException.
  31  *
  32  * @author  Josh Bloch
  33  * @since   1.5
  34  */
  35 public class TypeNotPresentExceptionProxy extends ExceptionProxy {
  36     private static final long serialVersionUID = 5565925172427947573L;
  37     final String typeName;
  38     final Throwable cause;
  39 
  40     public TypeNotPresentExceptionProxy(String typeName, Throwable cause) {
  41         this.typeName = typeName;
  42         this.cause = cause;
  43     }
  44 
  45     protected RuntimeException generateException() {
  46         return new TypeNotPresentException(typeName, cause);
  47     }
  48 








  49     @Override
  50     public String toString() {
  51         return typeName + ".class /* Warning: type not present! */";
  52     }
  53 }


  29 /**
  30  * ExceptionProxy for TypeNotPresentException.
  31  *
  32  * @author  Josh Bloch
  33  * @since   1.5
  34  */
  35 public class TypeNotPresentExceptionProxy extends ExceptionProxy {
  36     private static final long serialVersionUID = 5565925172427947573L;
  37     final String typeName;
  38     final Throwable cause;
  39 
  40     public TypeNotPresentExceptionProxy(String typeName, Throwable cause) {
  41         this.typeName = typeName;
  42         this.cause = cause;
  43     }
  44 
  45     protected RuntimeException generateException() {
  46         return new TypeNotPresentException(typeName, cause);
  47     }
  48 
  49     public String typeName() {
  50         return typeName;
  51     }
  52 
  53     public Throwable getCause() {
  54         return cause;
  55     }
  56 
  57     @Override
  58     public String toString() {
  59         return typeName + ".class /* Warning: type not present! */";
  60     }
  61 }
< prev index next >