From d479253768d296a40b4f699e1de9b03c7146a97a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 3 Dec 2013 14:03:28 -0800 Subject: Adding javadocs and Carbonado User Guide --- .../com/amazon/carbonado/util/ThrowUnchecked.html | 495 +++++++++++++++++++++ 1 file changed, 495 insertions(+) create mode 100644 apidocs/com/amazon/carbonado/util/ThrowUnchecked.html (limited to 'apidocs/com/amazon/carbonado/util/ThrowUnchecked.html') diff --git a/apidocs/com/amazon/carbonado/util/ThrowUnchecked.html b/apidocs/com/amazon/carbonado/util/ThrowUnchecked.html new file mode 100644 index 0000000..3eb5816 --- /dev/null +++ b/apidocs/com/amazon/carbonado/util/ThrowUnchecked.html @@ -0,0 +1,495 @@ + + + + + + +ThrowUnchecked (Carbonado 1.2.3 API) + + + + + + + +
+ + + + + +
+ + + +
+
com.amazon.carbonado.util
+

Class ThrowUnchecked

+
+
+ +
+
    +
  • +
    +
    Deprecated.  +
    use ThrowUnchecked instead
    +
    +
    +
    public abstract class ThrowUnchecked
    +extends java.lang.Object
    +
    Allows exceptions to be thrown which aren't declared to be thrown. Use of + this technique can cause confusion since it violates the Java language rules + for undeclared checked exceptions. For this reason, this class should not be + used except under special circumstances such as to work around compiler + bugs. An exception can be made, if calling any of the fireDeclared methods + and the set of declared types matches what the caller is allowed to throw. + +

    Example: + +

    + public <E extends Throwable> void someMethod(E exception) throws E {
    +     ...
    +
    +     // Apparent compiler bug sometimes disallows this. Doesn't appear to
    +     // show up when compiling source files individually.
    +
    +     //throw exception;
    +
    +     // Throw it this way instead, and compiler doesn't know.
    +     ThrowUnchecked.fire(exception);
    + }
    + 
    +
    Author:
    +
    Brian S O'Neill
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ModifierConstructor and Description
      protected ThrowUnchecked() +
      Deprecated. 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      protected abstract voiddoFire(java.lang.Throwable t) +
      Deprecated. 
      static voidfire(java.lang.Throwable t) +
      Deprecated. 
      +
      Throws the given exception, even though it may be checked.
      +
      static voidfireCause(java.lang.Throwable t) +
      Deprecated. 
      +
      Throws the cause of the given exception, even though it may be + checked.
      +
      static voidfireDeclared(java.lang.Throwable t, + java.lang.Class... declaredTypes) +
      Deprecated. 
      +
      Throws the given exception if it is unchecked or an instance of any of + the given declared types.
      +
      static voidfireDeclaredCause(java.lang.Throwable t, + java.lang.Class... declaredTypes) +
      Deprecated. 
      +
      Throws the cause of the given exception if it is unchecked or an + instance of any of the given declared types.
      +
      static voidfireDeclaredRootCause(java.lang.Throwable t, + java.lang.Class... declaredTypes) +
      Deprecated. 
      +
      Throws the root cause of the given exception if it is unchecked or an + instance of any of the given declared types.
      +
      static voidfireFirstDeclared(java.lang.Throwable t, + java.lang.Class... declaredTypes) +
      Deprecated. 
      +
      Throws the either the original exception or the first found cause if it + matches one of the given declared types or is unchecked.
      +
      static voidfireFirstDeclaredCause(java.lang.Throwable t, + java.lang.Class... declaredTypes) +
      Deprecated. 
      +
      Throws the first found cause that matches one of the given declared + types or is unchecked.
      +
      static voidfireRootCause(java.lang.Throwable t) +
      Deprecated. 
      +
      Throws the root cause of the given exception, even though it may be + checked.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ThrowUnchecked

        +
        protected ThrowUnchecked()
        +
        Deprecated. 
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        fire

        +
        public static void fire(java.lang.Throwable t)
        +
        Deprecated. 
        +
        Throws the given exception, even though it may be checked. This method + only returns normally if the exception is null.
        +
        Parameters:
        t - exception to throw
        +
      • +
      + + + +
        +
      • +

        fireDeclared

        +
        public static void fireDeclared(java.lang.Throwable t,
        +                java.lang.Class... declaredTypes)
        +
        Deprecated. 
        +
        Throws the given exception if it is unchecked or an instance of any of + the given declared types. Otherwise, it is thrown as an + UndeclaredThrowableException. This method only returns normally if the + exception is null.
        +
        Parameters:
        t - exception to throw
        declaredTypes - if exception is checked and is not an instance of + any of these types, then it is thrown as an + UndeclaredThrowableException.
        +
      • +
      + + + +
        +
      • +

        fireFirstDeclared

        +
        public static void fireFirstDeclared(java.lang.Throwable t,
        +                     java.lang.Class... declaredTypes)
        +
        Deprecated. 
        +
        Throws the either the original exception or the first found cause if it + matches one of the given declared types or is unchecked. Otherwise, the + original exception is thrown as an UndeclaredThrowableException. This + method only returns normally if the exception is null.
        +
        Parameters:
        t - exception whose cause is to be thrown
        declaredTypes - if exception is checked and is not an instance of + any of these types, then it is thrown as an + UndeclaredThrowableException.
        +
      • +
      + + + +
        +
      • +

        fireCause

        +
        public static void fireCause(java.lang.Throwable t)
        +
        Deprecated. 
        +
        Throws the cause of the given exception, even though it may be + checked. If the cause is null, then the original exception is + thrown. This method only returns normally if the exception is null.
        +
        Parameters:
        t - exception whose cause is to be thrown
        +
      • +
      + + + +
        +
      • +

        fireDeclaredCause

        +
        public static void fireDeclaredCause(java.lang.Throwable t,
        +                     java.lang.Class... declaredTypes)
        +
        Deprecated. 
        +
        Throws the cause of the given exception if it is unchecked or an + instance of any of the given declared types. Otherwise, it is thrown as + an UndeclaredThrowableException. If the cause is null, then the original + exception is thrown. This method only returns normally if the exception + is null.
        +
        Parameters:
        t - exception whose cause is to be thrown
        declaredTypes - if exception is checked and is not an instance of + any of these types, then it is thrown as an + UndeclaredThrowableException.
        +
      • +
      + + + +
        +
      • +

        fireFirstDeclaredCause

        +
        public static void fireFirstDeclaredCause(java.lang.Throwable t,
        +                          java.lang.Class... declaredTypes)
        +
        Deprecated. 
        +
        Throws the first found cause that matches one of the given declared + types or is unchecked. Otherwise, the immediate cause is thrown as an + UndeclaredThrowableException. If the immediate cause is null, then the + original exception is thrown. This method only returns normally if the + exception is null.
        +
        Parameters:
        t - exception whose cause is to be thrown
        declaredTypes - if exception is checked and is not an instance of + any of these types, then it is thrown as an + UndeclaredThrowableException.
        +
      • +
      + + + +
        +
      • +

        fireRootCause

        +
        public static void fireRootCause(java.lang.Throwable t)
        +
        Deprecated. 
        +
        Throws the root cause of the given exception, even though it may be + checked. If the root cause is null, then the original exception is + thrown. This method only returns normally if the exception is null.
        +
        Parameters:
        t - exception whose root cause is to be thrown
        +
      • +
      + + + +
        +
      • +

        fireDeclaredRootCause

        +
        public static void fireDeclaredRootCause(java.lang.Throwable t,
        +                         java.lang.Class... declaredTypes)
        +
        Deprecated. 
        +
        Throws the root cause of the given exception if it is unchecked or an + instance of any of the given declared types. Otherwise, it is thrown as + an UndeclaredThrowableException. If the root cause is null, then the + original exception is thrown. This method only returns normally if the + exception is null.
        +
        Parameters:
        t - exception whose root cause is to be thrown
        declaredTypes - if exception is checked and is not an instance of + any of these types, then it is thrown as an + UndeclaredThrowableException.
        +
      • +
      + + + +
        +
      • +

        doFire

        +
        protected abstract void doFire(java.lang.Throwable t)
        +
        Deprecated. 
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + +

Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.

+ + -- cgit v1.2.3