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

ru.hts.springwebdoclet.annotation.field.NotBlankAnnotationHandler Maven / Gradle / Ivy

package ru.hts.springwebdoclet.annotation.field;

import com.sun.javadoc.AnnotationDesc;
import com.sun.javadoc.FieldDoc;
import org.hibernate.validator.constraints.NotBlank;
import ru.hts.springwebdoclet.annotation.AnnotationHandler;
import ru.hts.springwebdoclet.render.RenderContext;

/**
 * Processes @NotBlank field annotation
 * @author Ivan Sungurov
 */
public class NotBlankAnnotationHandler implements AnnotationHandler {
    @Override
    public RenderContext handle(AnnotationDesc annotationDoc, FieldDoc target) {
        RenderContext context = new RenderContext();
        context.put("required", true);
        return context;
    }

    @Override
    public Class getSupportedAnnotation() {
        return NotBlank.class;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy