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

io.airlift.configuration.validation.FileExists Maven / Gradle / Ivy

There is a newer version: 284
Show newest version
package io.airlift.configuration.validation;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

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 static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * The annotated element must represent a file location which exists.
 * Supported types are:
 * 
    *
  • {@code Path}
  • *
  • {@code File}
  • *
  • {@code String}
  • *
*

* Note that constraint message is ignored as it's created by {@code FileExistsValidator}. */ @Target({FIELD, METHOD, PARAMETER, ANNOTATION_TYPE, TYPE_USE}) @Retention(RUNTIME) @Constraint(validatedBy = FileExistsValidator.class) @Documented public @interface FileExists { String message() default ""; Class[] groups() default { }; Class[] payload() default { }; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy