Class ComponentPrecondition.Input
- java.lang.Object
-
- de.codecentric.reedelk.runtime.api.commons.ComponentPrecondition.Input
-
- Enclosing class:
- ComponentPrecondition
public static class ComponentPrecondition.Input extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TrequireTypeMatches(Class<? extends Implementor> implementor, Object input, Class<T> expected)Checks if the input object has the expected type.static voidrequireTypeMatchesAny(Class<? extends Implementor> implementor, Object input, Class<?>... expected)Checks if the input object is one of the types given in the list.static voidrequireTypeMatchesAnyOrNull(Class<? extends Implementor> implementor, Object input, Class<?>... expected)Checks if the input object is one of the types given in the list.static <T> TrequireTypeMatchesOrNull(Class<? extends Implementor> implementor, Object input, Class<T> expected)Checks if the input object has the expected type.
-
-
-
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.
-
-