T - the class of the Controller to create links topublic abstract class MethodLinkFactorySupport<T> extends Object implements MethodLinkFactory<T>
MethodLinkFactory classes.| Constructor and Description |
|---|
MethodLinkFactorySupport(Class<T> controllerClass)
Creates an instance linked to the given controller class.
|
| Modifier and Type | Method and Description |
|---|---|
Class<T> |
getControllerClass()
Returns the class of the controller to create method links to.
|
protected T |
onController()
Utility method to simplify calling the
MvcUriComponentsBuilder.on(Class) method with the current
controller class. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoUripublic Class<T> getControllerClass()
MethodLinkFactorygetControllerClass in interface MethodLinkFactory<T>protected T onController()
MvcUriComponentsBuilder.on(Class) method with the current
controller class.
It can be used to shorten the creation of UriComponents to
controller methods like in the following example (for a controller
with a 'list' method with a single parameter):
[source,java]
----
fromMethodCall(onController().list(null)).build();
----Copyright © 2018 DISID Corporation. All rights reserved.