Class ServerEndpointAnalyzer
java.lang.Object
io.helidon.declarative.codegen.http.RestExtensionBase
io.helidon.declarative.codegen.http.webserver.ServerEndpointAnalyzer
Analyzer for declarative WebServer endpoints.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ServerEndpointAnalyzerCreate a new endpoint analyzer.endpoints(RegistryRoundContext roundContext) Analyze endpoint types available in the provided round.endpoints(Collection<TypeInfo> types) Analyze endpoint types from the provided candidates.Methods inherited from class RestExtensionBase
computedHeaders, consumes, headerProducers, headers, httpMethodFromAnnotation, path, produces, supplierOfModifier and TypeMethodDescriptionprotected voidcomputedHeaders(Set<Annotation> annotations, HttpAnnotated.BuilderBase<?, ?> builder, TypeName repeatedAnnotationType, TypeName singleAnnotationType) Find computed headers in the annotations and set it on the builder.protected voidconsumes(Set<Annotation> annotations, HttpAnnotated.BuilderBase<?, ?> builder) Find consumes in the annotations and set it on the builder.headerProducers(FieldHandler fieldHandler, RestEndpoint endpoint) Find all header producers and create appropriate fields, parameters, and assignments for them.protected voidheaders(Set<Annotation> annotations, HttpAnnotated.BuilderBase<?, ?> builder, TypeName repeatedAnnotationType, TypeName singleAnnotationType) Find headers in the annotations and set it on the builder.protected HttpMethodhttpMethodFromAnnotation(TypedElementInfo element, Annotation httpMethodAnnotation) Extract HTTP Method from its annotation.protected voidpath(Set<Annotation> annotations, HttpAnnotated.BuilderBase<?, ?> builder) Find path in the annotations and set it on the builder.protected voidproduces(Set<Annotation> annotations, HttpAnnotated.BuilderBase<?, ?> builder) Find produces in the annotations and set it on the builder.protected TypeNamesupplierOf(TypeName type) Create a type name that is a supplier of the provided type.
-
Method Details
-
create
Create a new endpoint analyzer.- Parameters:
ctx- code generation context- Returns:
- endpoint analyzer
-
endpoints
Analyze endpoint types available in the provided round.- Parameters:
roundContext- codegen round context- Returns:
- analyzed endpoints
-
endpoints
Analyze endpoint types from the provided candidates.- Parameters:
types- candidate endpoint types- Returns:
- analyzed endpoints
-