public class ReverseRouter extends Object implements WithControllerMethod<ReverseRouter.Builder>
Modifier and Type | Class and Description |
---|---|
static class |
ReverseRouter.Builder |
Constructor and Description |
---|
ReverseRouter(NinjaProperties ninjaProperties,
Router router) |
Modifier and Type | Method and Description |
---|---|
ReverseRouter.Builder |
with(Class<?> controllerClass,
String methodName)
Retrieves a the reverse route for this controllerClass and method.
|
ReverseRouter.Builder |
with(ControllerMethods.ControllerMethod controllerMethod)
Retrieves a the reverse route for a method referenced with Java-8
lambdas (functional method references).
|
ReverseRouter.Builder |
with(MethodReference methodRef)
Retrieves a the reverse route for the method reference (e.g.
|
@Inject public ReverseRouter(NinjaProperties ninjaProperties, Router router)
public ReverseRouter.Builder with(Class<?> controllerClass, String methodName)
controllerClass
- The controllerClass e.g. ApplicationController.classmethodName
- the methodName of the class e.g. "index"Builder
allowing setting path placeholders and
queryParam string parameters.public ReverseRouter.Builder with(MethodReference methodRef)
methodRef
- The reference to a methodBuilder
allowing setting path placeholders and
queryParam string parameters.public ReverseRouter.Builder with(ControllerMethods.ControllerMethod controllerMethod)
with
in interface WithControllerMethod<ReverseRouter.Builder>
controllerMethod
- The Java-8 style method reference such as
ApplicationController::index
.Builder
allowing setting path placeholders and
queryParam string parameters.Copyright © 2019 ninjaframework. All rights reserved.