Returns all declared exception types of this Invokable.
()
| 137 | |
| 138 | |
| 139 | public final ImmutableList<TypeToken<? extends Throwable>> getExceptionTypes() { |
| 140 | ImmutableList.Builder<TypeToken<? extends Throwable>> builder = ImmutableList.builder(); |
| 141 | for (Type type : getGenericExceptionTypes()) { |
| 142 | // getGenericExceptionTypes() will never return a type that's not exception |
| 143 | @SuppressWarnings("unchecked") |
| 144 | TypeToken<? extends Throwable> exceptionType = (TypeToken<? extends Throwable>) TypeToken.of(type); |
| 145 | builder.add(exceptionType); |
| 146 | } |
| 147 | return builder.build(); |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * Explicitly specifies the return type of this {@code Invokable}. For example: |
no test coverage detected