Class RequestMappingAnnotationTransformer

java.lang.Object
io.micronaut.spring.web.annotation.RequestMappingAnnotationTransformer
All Implemented Interfaces:
io.micronaut.core.naming.Named, io.micronaut.inject.annotation.AnnotationTransformer<Annotation>, io.micronaut.inject.annotation.NamedAnnotationTransformer
Direct Known Subclasses:
DeleteMappingAnnotationTransformer, GetMappingAnnotationTransformer, PatchMappingAnnotationTransformer, PostMappingAnnotationTransformer, PutMappingAnnotationTransformer

public class RequestMappingAnnotationTransformer extends Object implements io.micronaut.inject.annotation.NamedAnnotationTransformer
Maps Spring RequestMapping to Micronaut.
Since:
1.0
Author:
graemerocher
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    protected boolean
    isHttpMethodMapping(@Nullable io.micronaut.http.HttpMethod method)
    Whether the given method is an HTTP method mapping.
    protected @NonNull io.micronaut.core.annotation.AnnotationValueBuilder<?>
    newBuilder(@Nullable io.micronaut.http.HttpMethod httpMethod, io.micronaut.core.annotation.AnnotationValue<Annotation> annotation)
    Construct a new builder for the given http method.
    List<io.micronaut.core.annotation.AnnotationValue<?>>
    transform(io.micronaut.core.annotation.AnnotationValue<Annotation> annotation, io.micronaut.inject.visitor.VisitorContext visitorContext)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RequestMappingAnnotationTransformer

      public RequestMappingAnnotationTransformer()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface io.micronaut.core.naming.Named
    • isHttpMethodMapping

      protected boolean isHttpMethodMapping(@Nullable @Nullable io.micronaut.http.HttpMethod method)
      Whether the given method is an HTTP method mapping.
      Parameters:
      method - The method, can be null
      Returns:
      True if it is
    • newBuilder

      @NonNull protected @NonNull io.micronaut.core.annotation.AnnotationValueBuilder<?> newBuilder(@Nullable @Nullable io.micronaut.http.HttpMethod httpMethod, io.micronaut.core.annotation.AnnotationValue<Annotation> annotation)
      Construct a new builder for the given http method.
      Parameters:
      httpMethod - The method
      annotation - The annotation
      Returns:
      The builder
    • transform

      public List<io.micronaut.core.annotation.AnnotationValue<?>> transform(io.micronaut.core.annotation.AnnotationValue<Annotation> annotation, io.micronaut.inject.visitor.VisitorContext visitorContext)
      Specified by:
      transform in interface io.micronaut.inject.annotation.AnnotationTransformer<Annotation>