Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2012-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.hateoas.core;
Strategy interface to discover a URI mapping for either a given type or method.

Author(s):
Oliver Gierke
public interface MappingDiscoverer {

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.
	String getMapping(Class<?> type);

Returns the mapping associated with the given java.lang.reflect.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.
Returns the mapping for the given java.lang.reflect.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.
	String getMapping(Class<?> typeMethod method);
New to GrepCode? Check out our FAQ X