Index
All Classes and Interfaces|All Packages|Serialized Form
C
- com.github.stefanbirkner.fishbowl - package com.github.stefanbirkner.fishbowl
D
- defaultIfException(StatementWithReturnValue<V>, Class<? extends Throwable>, V) - Static method in class com.github.stefanbirkner.fishbowl.Fishbowl
-
Executes the given statement and returns the statement's return value if no exception is thrown or the default value if an exception of the specified type is thrown.
E
- evaluate() - Method in interface com.github.stefanbirkner.fishbowl.Statement
-
Execute the statement.
- evaluate() - Method in interface com.github.stefanbirkner.fishbowl.StatementWithReturnValue
-
Computes a value, or throws an exception if unable to do so.
- ExceptionNotThrownFailure - Error in com.github.stefanbirkner.fishbowl
-
This exception is thrown by
exceptionThrownBy(Statement)
if the providedStatement
did not throw an exception. - ExceptionNotThrownFailure() - Constructor for error com.github.stefanbirkner.fishbowl.ExceptionNotThrownFailure
-
Creates a new
ExceptionNotThrownFailure
. - exceptionThrownBy(Statement) - Static method in class com.github.stefanbirkner.fishbowl.Fishbowl
-
Executes the provided statement and returns the exception that has been thrown by the statement.
- exceptionThrownBy(Statement, Class<T>) - Static method in class com.github.stefanbirkner.fishbowl.Fishbowl
-
Executes the provided statement and returns the exception that has been thrown by the statement if it has the specified type.
- ExceptionWithWrongTypeThrownFailure - Error in com.github.stefanbirkner.fishbowl
-
This exception is thrown by
exceptionThrownBy(Statement, java.lang.Class)
if the providedStatement
did throw an exception that does not have the specified type. - ExceptionWithWrongTypeThrownFailure(Class<? extends Throwable>, Throwable) - Constructor for error com.github.stefanbirkner.fishbowl.ExceptionWithWrongTypeThrownFailure
-
Creates a new
ExceptionWithWrongTypeThrownFailure
. - expectedType - Variable in error com.github.stefanbirkner.fishbowl.ExceptionWithWrongTypeThrownFailure
F
- Fishbowl - Class in com.github.stefanbirkner.fishbowl
-
Fishbowl
provides helper methods for dealing with exceptions. - Fishbowl() - Constructor for class com.github.stefanbirkner.fishbowl.Fishbowl
-
This class only provides static methods.
G
- getExpectedType() - Method in error com.github.stefanbirkner.fishbowl.ExceptionWithWrongTypeThrownFailure
-
Returns the type of the expected exception.
- getThrownException() - Method in error com.github.stefanbirkner.fishbowl.ExceptionWithWrongTypeThrownFailure
-
Returns the exception that has been thrown.
I
- ignoreException(Statement) - Static method in class com.github.stefanbirkner.fishbowl.Fishbowl
-
Executes the given statement and suppresses any exception thrown by the statement.
- ignoreException(Statement, Class<? extends Throwable>) - Static method in class com.github.stefanbirkner.fishbowl.Fishbowl
-
Executes the given statement and suppresses any exception of the specified type that is thrown by the statement.
S
- Statement - Interface in com.github.stefanbirkner.fishbowl
-
Code that should be executed by
exceptionThrownBy(Statement)
. - StatementWithReturnValue<V> - Interface in com.github.stefanbirkner.fishbowl
-
Code that returns a value if it is executed by
exceptionThrownBy(Statement)
.
W
- wrapCheckedException(Statement) - Static method in class com.github.stefanbirkner.fishbowl.Fishbowl
-
Executes the given statement and encloses any checked exception thrown with an unchecked
WrappedException
, that is thrown instead. - wrapCheckedException(StatementWithReturnValue<V>) - Static method in class com.github.stefanbirkner.fishbowl.Fishbowl
-
Executes the given statement and encloses any checked exception thrown with an unchecked
WrappedException
, that is thrown instead. - WrappedException - Exception in com.github.stefanbirkner.fishbowl
-
Wraps another exception.
- WrappedException(Throwable) - Constructor for exception com.github.stefanbirkner.fishbowl.WrappedException
All Classes and Interfaces|All Packages|Serialized Form