code: public static <T extends MethodDescription> ElementMatcher.Junction<T> canThrow(TypeDescription exceptionType) {
          return exceptionType.isAssignableTo(RuntimeException.class) || exceptionType.isAssignableTo(Error.class)
                  ? new BooleanMatcher<T>(true)
                  : ElementMatchers.<T>declaresGenericException(new CollectionItemMatcher<TypeDescription.Generic>(erasure(isSuperTypeOf(exceptionType))));
      }
docs: Matches a {@link MethodDescription} by its capability to throw a given
  checked exception. For specifying a non-checked exception, any method is matched.
  
  @param exceptionType The type of the exception that should be declared by the method to be matched.
  @param <T>           The type of the matched object.
  @return A matcher that matches a method description by its declaration of throwing a checked exception.