public class BasicObjectRouteMatch extends Object implements RouteMatch<Object>
EMPTY
Constructor and Description |
---|
BasicObjectRouteMatch(Object object) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(MediaType contentType)
Whether the specified content type is an accepted type.
|
RouteMatch<Object> |
decorate(Function<RouteMatch<Object>,Object> executor)
Decorates the execution of the route with the given executor.
|
Object |
execute(Map<String,Object> argumentValues)
Execute the route with the given values.
|
RouteMatch<Object> |
fulfill(Map<String,Object> argumentValues)
Returns a new
RouteMatch fulfilling arguments required by this route to execute. |
Optional<Argument<?>> |
getBodyArgument() |
Class<?> |
getDeclaringType()
The declaring type of the route.
|
List<MediaType> |
getProduces()
The media types able to produced by this route.
|
Optional<Argument<?>> |
getRequiredInput(String name)
Return whether the given named input is required by this route.
|
ReturnType<?> |
getReturnType() |
Map<String,Object> |
getVariableValues() |
boolean |
test(HttpRequest httpRequest) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
call, execute, getRequiredArguments, isExecutable, isRequiredInput, isSatisfied
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation
public BasicObjectRouteMatch(Object object)
object
- An objectpublic Class<?> getDeclaringType()
RouteMatch
getDeclaringType
in interface RouteMatch<Object>
public Map<String,Object> getVariableValues()
getVariableValues
in interface RouteMatch<Object>
public Object execute(Map<String,Object> argumentValues)
RouteMatch
RouteMatch.getRequiredArguments()
.execute
in interface RouteMatch<Object>
argumentValues
- The argument valuespublic RouteMatch<Object> fulfill(Map<String,Object> argumentValues)
RouteMatch
RouteMatch
fulfilling arguments required by this route to execute. The new route will not
return the given arguments from the RouteMatch.getRequiredArguments()
method.fulfill
in interface RouteMatch<Object>
argumentValues
- The argument valuespublic RouteMatch<Object> decorate(Function<RouteMatch<Object>,Object> executor)
RouteMatch
decorate
in interface RouteMatch<Object>
executor
- The executorpublic Optional<Argument<?>> getRequiredInput(String name)
RouteMatch
getRequiredInput
in interface RouteMatch<Object>
name
- The name of the inputpublic Optional<Argument<?>> getBodyArgument()
getBodyArgument
in interface RouteMatch<Object>
public List<MediaType> getProduces()
RouteMatch
getProduces
in interface RouteMatch<Object>
MediaType
that this route can producepublic ReturnType<?> getReturnType()
getReturnType
in interface RouteMatch<Object>
public boolean accept(@Nullable MediaType contentType)
RouteMatch
accept
in interface RouteMatch<Object>
contentType
- The content typepublic boolean test(HttpRequest httpRequest)
test
in interface Predicate<HttpRequest>