Spring Hateoas

org.springframework.hateoas.core
Interface MappingDiscoverer

All Known Implementing Classes:
AnnotationMappingDiscoverer

public interface MappingDiscoverer

Strategy interface to discover a URI mapping for either a given type or method.

Author:
Oliver Gierke

Method Summary
 String getMapping(Class<?> type)
          Returns the mapping associated with the given type.
 String getMapping(Class<?> type, Method method)
          Returns the mapping for the given Method invoked on the given type.
 String getMapping(Method method)
          Returns the mapping associated with the given Method.
 

Method Detail

getMapping

String getMapping(Class<?> type)
Returns the mapping associated with the given type.

Parameters:
type - must not be null.
Returns:
the type-level mapping or null in case none is present.

getMapping

String getMapping(Method method)
Returns the mapping associated with the given Method. This will include the type-level mapping.

Parameters:
method - must not be null.
Returns:
the method mapping including the type-level one or null if neither of them present.

getMapping

String getMapping(Class<?> type,
                  Method method)
Returns the mapping for the given Method invoked on the given type. This can be used to calculate the mapping for a super type method being invoked on a sub-type with a type mapping.

Parameters:
type - must not be null.
method - must not be null.
Returns:
the method mapping including the type-level one or null if neither of them present.

Spring Hateoas

Copyright © 2012-2014-2014 Pivotal, Inc.. All Rights Reserved.