Class ValidationVisitor

java.lang.Object
io.micronaut.validation.visitor.ValidationVisitor
All Implemented Interfaces:
io.micronaut.core.order.Ordered, io.micronaut.core.util.Toggleable, io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>

@Internal public class ValidationVisitor extends Object implements io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
The visitor creates annotations utilized by the Validator. It adds @RequiresValidation annotation to fields if they require validation, and to methods if one of the parameters or return value require validation.
Since:
4.0.0
Author:
Denis Stepanov
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.micronaut.inject.visitor.TypeElementVisitor

    io.micronaut.inject.visitor.TypeElementVisitor.VisitorKind
  • Field Summary

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
     
    @NonNull io.micronaut.inject.visitor.TypeElementVisitor.VisitorKind
     
    void
    visitClass(io.micronaut.inject.ast.ClassElement element, io.micronaut.inject.visitor.VisitorContext context)
     
    void
    visitConstructor(io.micronaut.inject.ast.ConstructorElement element, io.micronaut.inject.visitor.VisitorContext context)
     
    void
    visitField(io.micronaut.inject.ast.FieldElement element, io.micronaut.inject.visitor.VisitorContext context)
     
    void
    visitMethod(io.micronaut.inject.ast.MethodElement element, io.micronaut.inject.visitor.VisitorContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.core.util.Toggleable

    isEnabled

    Methods inherited from interface io.micronaut.inject.visitor.TypeElementVisitor

    finish, getClassType, getElementType, getSupportedOptions, start, visitEnumConstant
  • Constructor Details

    • ValidationVisitor

      public ValidationVisitor()
  • Method Details

    • getSupportedAnnotationNames

      public Set<String> getSupportedAnnotationNames()
      Specified by:
      getSupportedAnnotationNames in interface io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface io.micronaut.core.order.Ordered
    • getVisitorKind

      @NonNull public @NonNull io.micronaut.inject.visitor.TypeElementVisitor.VisitorKind getVisitorKind()
      Specified by:
      getVisitorKind in interface io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
    • visitClass

      public void visitClass(io.micronaut.inject.ast.ClassElement element, io.micronaut.inject.visitor.VisitorContext context)
      Specified by:
      visitClass in interface io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
    • visitConstructor

      public void visitConstructor(io.micronaut.inject.ast.ConstructorElement element, io.micronaut.inject.visitor.VisitorContext context)
      Specified by:
      visitConstructor in interface io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
    • visitMethod

      public void visitMethod(io.micronaut.inject.ast.MethodElement element, io.micronaut.inject.visitor.VisitorContext context)
      Specified by:
      visitMethod in interface io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
    • visitField

      public void visitField(io.micronaut.inject.ast.FieldElement element, io.micronaut.inject.visitor.VisitorContext context)
      Specified by:
      visitField in interface io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>