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

cn.allbs.hj212.validator.clazz.FieldC Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package cn.allbs.hj212.validator.clazz;


import cn.allbs.hj212.validator.field.C;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * @author ChenQi
 */
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
@Repeatable(FieldC.List.class)
@Constraint(validatedBy = T212MapCValidator.class)
public @interface FieldC {

    String field() default "";

    C value();

    String message() default "invalid C type";

    Class[] groups() default {};

    Class[] payload() default {};

    boolean optional() default false;

    boolean regex() default false;

    /**
     * Defines several {@link FieldC} annotations on the same element.
     *
     * @see FieldC
     */
    @Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
    @Retention(RUNTIME)
    @Documented
    @interface List {

        FieldC[] value();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy