Interface ConstraintFactory<A extends Annotation>

Type Parameters:
A - the annotation type

public interface ConstraintFactory<A extends Annotation>
Factory for creating constraints from annotations.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Constraint<?>
    create(A annotation)
    Creates a constraint from the annotation instance.
    @NotNull Class<A>
    Gets the annotation type this factory handles.
  • Method Details

    • create

      @NotNull @NotNull Constraint<?> create(@NotNull A annotation)
      Creates a constraint from the annotation instance.
      Parameters:
      annotation - the annotation
      Returns:
      the constraint
    • getAnnotationType

      @NotNull @NotNull Class<A> getAnnotationType()
      Gets the annotation type this factory handles.
      Returns:
      the annotation class