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
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
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)
-
Constructor Details
-
RequestMappingAnnotationTransformer
public RequestMappingAnnotationTransformer()
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceio.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 methodannotation
- 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 interfaceio.micronaut.inject.annotation.AnnotationTransformer<Annotation>
-