Package org.instancio.internal
Class ApiValidator
java.lang.Object
org.instancio.internal.ApiValidator
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic voidstatic <T> Collection<T>notEmpty(@Nullable Collection<T> collection, String message, Object... values) static <T> T[]static <T> Tstatic <T> Tstatic voidvalidateField(Class<?> declaringClass, String fieldName, String message) static voidstatic voidvalidateGeneratorUsage(InternalNode node, Generator<?> generator) static voidvalidateKeyValue(@Nullable SettingKey<?> key, @Nullable Object value) static intvalidateLength(int length) static <T> Class<T>validateRootClass(@Nullable Class<T> klass) static intvalidateSize(int size) static voidvalidateSubtype(Class<?> from, Class<?> to) static voidvalidateSupplierOrGenerator(@Nullable Object obj) static voidvalidateTypeParameters(Class<?> rootClass, List<Class<?>> rootTypeParameters) static TypevalidateTypeToken(@Nullable TypeTokenSupplier<?> typeTokenSupplier)
-
Method Details
-
validateRootClass
-
validateTypeToken
-
validateTypeParameters
-
validateSubtype
-
validateKeyValue
public static void validateKeyValue(@Nullable @Nullable SettingKey<?> key, @Nullable @Nullable Object value) -
notEmpty
-
notEmpty
public static <T> Collection<T> notEmpty(@Nullable @Nullable Collection<T> collection, String message, Object... values) -
validateGeneratorUsage
-
validateGenerateSecondArgument
-
validateSupplierOrGenerator
-
validateSize
public static int validateSize(int size) -
validateLength
public static int validateLength(int length) -
notNull
-
notNull
-
isTrue
-
isFalse
-
isFalse
-
validateField
-