class ToStringVisitor extends java.lang.Object implements RouterFunctions.Visitor
RouterFunctions.Visitor
that creates a formatted string representation
of router functions.Modifier and Type | Field and Description |
---|---|
private java.lang.StringBuilder |
builder |
private int |
indent |
private static java.lang.String |
NEW_LINE |
Constructor and Description |
---|
ToStringVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
endNested(RequestPredicate predicate)
Receive notification of the end of a nested router function.
|
private void |
indent() |
void |
resources(java.util.function.Function<ServerRequest,<any>> lookupFunction)
Receive notification of a resource router function.
|
void |
route(RequestPredicate predicate,
HandlerFunction<?> handlerFunction)
Receive notification of a standard predicated route to a handler function.
|
void |
startNested(RequestPredicate predicate)
Receive notification of the beginning of a nested router function.
|
java.lang.String |
toString() |
void |
unknown(RouterFunction<?> routerFunction)
Receive notification of an unknown router function.
|
private static final java.lang.String NEW_LINE
private final java.lang.StringBuilder builder
private int indent
public void startNested(RequestPredicate predicate)
RouterFunctions.Visitor
startNested
in interface RouterFunctions.Visitor
predicate
- the predicate that applies to the nested router functionsRouterFunctions.nest(RequestPredicate, RouterFunction)
public void endNested(RequestPredicate predicate)
RouterFunctions.Visitor
endNested
in interface RouterFunctions.Visitor
predicate
- the predicate that applies to the nested router functionsRouterFunctions.nest(RequestPredicate, RouterFunction)
public void route(RequestPredicate predicate, HandlerFunction<?> handlerFunction)
RouterFunctions.Visitor
route
in interface RouterFunctions.Visitor
predicate
- the predicate that applies to the handler functionhandlerFunction
- the handler function.RouterFunctions.route(RequestPredicate, HandlerFunction)
public void resources(java.util.function.Function<ServerRequest,<any>> lookupFunction)
RouterFunctions.Visitor
resources
in interface RouterFunctions.Visitor
lookupFunction
- the lookup function for the resourcesRouterFunctions.resources(Function)
public void unknown(RouterFunction<?> routerFunction)
RouterFunctions.Visitor
RouterFunctions
methods.unknown
in interface RouterFunctions.Visitor
routerFunction
- the router functionprivate void indent()
public java.lang.String toString()
toString
in class java.lang.Object