Class ExceptionMatcher

  • All Implemented Interfaces:
    org.hamcrest.Matcher<java.lang.Throwable>, org.hamcrest.SelfDescribing

    public class ExceptionMatcher
    extends org.hamcrest.BaseMatcher<java.lang.Throwable>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private @NotNull java.lang.String message  
      private @NotNull java.util.regex.Pattern pattern  
      private @NotNull java.lang.String prefix  
    • Constructor Summary

      Constructors 
      Constructor Description
      ExceptionMatcher​(@NotNull java.lang.Class<? extends java.lang.Throwable> throwable, @NotNull java.util.regex.Pattern pattern, @NotNull java.lang.String message)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void describeTo​(org.hamcrest.Description description)  
      static @NotNull ExceptionMatcher match​(@NotNull java.lang.Class<? extends java.lang.Throwable> throwable, @NotNull java.lang.String text)  
      boolean matches​(java.lang.Object o)  
      static @NotNull ExceptionMatcher matchPrefix​(@NotNull java.lang.Class<? extends java.lang.Throwable> throwable, @NotNull java.lang.String text)  
      static @NotNull ExceptionMatcher matchRegEx​(@NotNull java.lang.Class<? extends java.lang.Throwable> throwable, @NotNull java.lang.String regEx)  
      • Methods inherited from class org.hamcrest.BaseMatcher

        _dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, isNotNull, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • prefix

        @NotNull
        private final @NotNull java.lang.String prefix
      • pattern

        @NotNull
        private final @NotNull java.util.regex.Pattern pattern
      • message

        @NotNull
        private final @NotNull java.lang.String message
    • Constructor Detail

      • ExceptionMatcher

        public ExceptionMatcher​(@NotNull
                                @NotNull java.lang.Class<? extends java.lang.Throwable> throwable,
                                @NotNull
                                @NotNull java.util.regex.Pattern pattern,
                                @NotNull
                                @NotNull java.lang.String message)
    • Method Detail

      • matches

        public boolean matches​(java.lang.Object o)
      • describeTo

        public void describeTo​(org.hamcrest.Description description)
      • match

        @NotNull
        public static @NotNull ExceptionMatcher match​(@NotNull
                                                      @NotNull java.lang.Class<? extends java.lang.Throwable> throwable,
                                                      @NotNull
                                                      @NotNull java.lang.String text)
      • matchPrefix

        @NotNull
        public static @NotNull ExceptionMatcher matchPrefix​(@NotNull
                                                            @NotNull java.lang.Class<? extends java.lang.Throwable> throwable,
                                                            @NotNull
                                                            @NotNull java.lang.String text)
      • matchRegEx

        @NotNull
        public static @NotNull ExceptionMatcher matchRegEx​(@NotNull
                                                           @NotNull java.lang.Class<? extends java.lang.Throwable> throwable,
                                                           @NotNull
                                                           @NotNull java.lang.String regEx)