io.avaje.validation.constraints.AssertTrue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avaje-validator-constraints Show documentation
Show all versions of avaje-validator-constraints Show documentation
avaje validator constraint annotations
The newest version!
package io.avaje.validation.constraints;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.TYPE_USE;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* The annotated element must be true. Supported types are {@code boolean} and {@code Boolean}.
*
* {@code null} elements are considered valid.
*
* @author Emmanuel Bernard
*/
@Constraint(unboxPrimitives = true)
@Target({METHOD, FIELD, ANNOTATION_TYPE, PARAMETER, TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
public @interface AssertTrue {
String message() default "{avaje.AssertTrue.message}";
Class>[] groups() default {};
}