io.avaje.validation.MixIn 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;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.SOURCE;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Marks this Class as a MixIn Type that can add/modify constraint annotations on the specified type.
*
* These types are typically in an external project / dependency or otherwise
* types that we can't explicitly annotate or modify.
*
* In the example below, the VehicleMixin class augments the the generated Vehicle
* adapter to add a @NotBlank annotation to the type property.
*
*
{@code
*
* @MixIn(Vehicle.class)
* public abstract class VehicleMixIn {
*
* @NotBlank
* private String type;
* ...
*
* }
*/
@Target(TYPE)
@Retention(SOURCE)
public @interface MixIn {
/** The concrete type to mix. */
Class> value();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy