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

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

package ru.hts.springwebdoclet.annotation.field;

import com.sun.javadoc.AnnotationDesc;
import com.sun.javadoc.FieldDoc;
import ru.hts.springwebdoclet.annotation.AnnotationHandler;
import ru.hts.springwebdoclet.render.RenderContext;

import javax.validation.constraints.NotNull;

/**
 * Processes @NotNull field annotation
 * @author Ivan Sungurov
 */
public class NotNullAnnotationHandler 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 NotNull.class;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy