
io.avaje.validation.spi.AdapterFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avaje-validator Show documentation
Show all versions of avaje-validator Show documentation
validator for annotated pojos using constraint annotations and source code generation
package io.avaje.validation.spi;
import java.lang.reflect.Type;
import io.avaje.validation.adapter.ValidationAdapter;
import io.avaje.validation.adapter.ValidationContext;
/** Factory for creating a ValidationAdapter for a given type. */
@FunctionalInterface
public non-sealed interface AdapterFactory extends ValidationExtension {
/**
* Create and return a ValidationAdapter given the type and annotations or return null. Returning
* null means that the adapter could be created by another factory.
*
* @param type The type for which the adapter is being created
* @param ctx The validation context
* @return The created validation adapter or null if not applicable
*/
ValidationAdapter> create(Type type, ValidationContext ctx);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy