Class ComponentPrecondition.Input

    • Method Detail

      • requireTypeMatches

        public static <T> T requireTypeMatches​(Class<? extends Implementor> implementor,
                                               Object input,
                                               Class<T> expected)
        Checks if the input object has the expected type. An exception is thrown in the input object does not have the expected type or if the input object is null.
      • requireTypeMatchesOrNull

        public static <T> T requireTypeMatchesOrNull​(Class<? extends Implementor> implementor,
                                                     Object input,
                                                     Class<T> expected)
        Checks if the input object has the expected type. An exception is thrown in the input object does not have the expected type.
      • requireTypeMatchesAny

        public static void requireTypeMatchesAny​(Class<? extends Implementor> implementor,
                                                 Object input,
                                                 Class<?>... expected)
        Checks if the input object is one of the types given in the list. An exception is thrown in the input object does not have one of the expected types or if the input object is null.
      • requireTypeMatchesAnyOrNull

        public static void requireTypeMatchesAnyOrNull​(Class<? extends Implementor> implementor,
                                                       Object input,
                                                       Class<?>... expected)
        Checks if the input object is one of the types given in the list. An exception is thrown in the input object does not have one of the expected types.