- All Superinterfaces:
io.inverno.core.compiler.spi.Info,io.inverno.core.compiler.spi.ReporterInfo
public interface WebRouteInfo
extends io.inverno.core.compiler.spi.Info
Describes a web route.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionString[]Returns the consumed media ranges specified in the route.Returns the web controller that defines the route.Returns the executable element defining the web route.String[]Returns the produced languages specified in the route.Method[]Returns the methods specified in the route.Returns the parameters specified in the route.String[]getPaths()Returns the paths specified in the route.String[]Returns the produced media types specified in the route.Returns the response body specified in the route.booleanDetermines whether the trailing slash should be matched.Methods inherited from interface io.inverno.core.compiler.spi.ReporterInfo
error, hasError, hasWarning, warning
-
Method Details
-
getQualifiedName
WebRouteQualifiedName getQualifiedName()- Specified by:
getQualifiedNamein interfaceio.inverno.core.compiler.spi.Info
-
getController
Optional<WebControllerInfo> getController()Returns the web controller that defines the route.
- Returns:
- an optional returning the web controller or an empty optional if the route has been defined outside of a web controller (eg. in a web router configurer)
-
getElement
Optional<ExecutableElement> getElement()Returns the executable element defining the web route.
- Returns:
- an optional returning the executable element or an empty optional if the route has not been defined with a method (eg. declared in a web router configurer)
-
getPaths
String[] getPaths()Returns the paths specified in the route.
- Returns:
- an array of paths
-
isMatchTrailingSlash
boolean isMatchTrailingSlash()Determines whether the trailing slash should be matched.
- Returns:
- true to match the trailing slash, false otherwiser
-
getMethods
Method[] getMethods()Returns the methods specified in the route.
- Returns:
- an array of methods
-
getConsumes
String[] getConsumes()Returns the consumed media ranges specified in the route.
- Returns:
- an array of media ranges
-
getProduces
String[] getProduces()Returns the produced media types specified in the route.
- Returns:
- an array of media types
-
getLanguages
String[] getLanguages()Returns the produced languages specified in the route.
- Returns:
- an array of language tags
-
getParameters
WebParameterInfo[] getParameters()Returns the parameters specified in the route.
- Returns:
- an array of web parameter info
-
getResponseBody
WebResponseBodyInfo getResponseBody()Returns the response body specified in the route.
- Returns:
- a response body info
-