Class ValidatingAnnotationMapper

java.lang.Object
io.micronaut.serde.processor.jackson.ValidatingAnnotationMapper
All Implemented Interfaces:
io.micronaut.core.naming.Named, io.micronaut.inject.annotation.AnnotationMapper<Annotation>, io.micronaut.inject.annotation.NamedAnnotationMapper
Direct Known Subclasses:
JsonAnyGetterMapper, JsonAnySetterMapper, JsonDeserializeMapper, JsonFormatMapper, JsonPropertyOrderMapper, JsonSerializeMapper, JsonSetterMapper, JsonTypeInfoMapper, JsonValueMapper

public abstract class ValidatingAnnotationMapper extends Object implements io.micronaut.inject.annotation.NamedAnnotationMapper
Abstract transformer that validate supported members returned by getSupportedMemberNames().
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected @NonNull Set<String>
     
    final List<io.micronaut.core.annotation.AnnotationValue<?>>
    map(io.micronaut.core.annotation.AnnotationValue<Annotation> annotation, io.micronaut.inject.visitor.VisitorContext visitorContext)
     
    protected abstract List<io.micronaut.core.annotation.AnnotationValue<?>>
    mapValid(io.micronaut.core.annotation.AnnotationValue<Annotation> annotation, io.micronaut.inject.visitor.VisitorContext visitorContext)
    The transform method will be called for each instances of the annotation returned via this method.

    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.naming.Named

    getName
  • Constructor Details

    • ValidatingAnnotationMapper

      public ValidatingAnnotationMapper()
  • Method Details

    • map

      public final List<io.micronaut.core.annotation.AnnotationValue<?>> map(io.micronaut.core.annotation.AnnotationValue<Annotation> annotation, io.micronaut.inject.visitor.VisitorContext visitorContext)
      Specified by:
      map in interface io.micronaut.inject.annotation.AnnotationMapper<Annotation>
    • mapValid

      protected abstract List<io.micronaut.core.annotation.AnnotationValue<?>> mapValid(io.micronaut.core.annotation.AnnotationValue<Annotation> annotation, io.micronaut.inject.visitor.VisitorContext visitorContext)
      The transform method will be called for each instances of the annotation returned via this method.
      Parameters:
      annotation - The annotation values
      visitorContext - The context that is being visited
      Returns:
      A list of zero or many annotations and values to map to
    • getSupportedMemberNames

      @NonNull protected @NonNull Set<String> getSupportedMemberNames()
      Returns:
      The set of annotation member names that are supported.