All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.avaje.validation.spi.AdapterFactory Maven / Gradle / Ivy

Go to download

validator for annotated pojos using constraint annotations and source code generation

There is a newer version: 2.9
Show newest version
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