public interface MethodLinkBuilderFactory<T extends LinkBuilder> extends LinkBuilderFactory<T>
LinkBuilderFactory
for implementations that also support creating LinkBuilder
s by
pointing to a method.Modifier and Type | Method and Description |
---|---|
T |
linkTo(Class<?> type,
Method method)
Returns a
LinkBuilder pointing to the URI mapped to the given Method assuming it was invoked on an
object of the given type expanding the mapping using null values as parameters. |
T |
linkTo(Class<?> type,
Method method,
Object... parameters)
Returns a
LinkBuilder pointing to the URI mapped to the given Method assuming it was invoked on an
object of the given type. |
T |
linkTo(Method method)
Returns a
LinkBuilder pointing to the URI mapped to the given Method and expanding this mapping
using null values as parameters. |
T |
linkTo(Method method,
Object... parameters)
Returns a
LinkBuilder pointing to the URI mapped to the given Method and expanding this mapping
using the given parameters. |
T |
linkTo(Object methodInvocationResult)
Returns a
LinkBuilder pointing to the URI mapped to the method the result is handed into this method. |
linkTo, linkTo, linkTo
T linkTo(Method method)
LinkBuilder
pointing to the URI mapped to the given Method
and expanding this mapping
using null values as parameters.method
- must not be null.T linkTo(Method method, Object... parameters)
LinkBuilder
pointing to the URI mapped to the given Method
and expanding this mapping
using the given parameters. The number of parameter values has to match the length of the given method's expected
parameters.method
- must not be null.parameters
- T linkTo(Class<?> type, Method method)
LinkBuilder
pointing to the URI mapped to the given Method
assuming it was invoked on an
object of the given type expanding the mapping using null values as parameters.type
- must not be null.method
- must not be null.T linkTo(Class<?> type, Method method, Object... parameters)
LinkBuilder
pointing to the URI mapped to the given Method
assuming it was invoked on an
object of the given type. The number of parameter values has to match the length of the given method's expected
parameters.type
- must not be null.method
- must not be null.parameters
- T linkTo(Object methodInvocationResult)
LinkBuilder
pointing to the URI mapped to the method the result is handed into this method. Use
DummyInvocationUtils.methodOn(Class, Object...)
to obtain a dummy instance of a controller to record a
dummy method invocation on. See WebMvcLinkBuilder.linkTo(Object)
for an example.methodInvocationResult
- must not be null.WebMvcLinkBuilder.linkTo(Object)
Copyright © 2011–2021 Pivotal, Inc.. All rights reserved.