Spring Hateoas

org.springframework.hateoas.core
Class MethodParameters

java.lang.Object
  extended by org.springframework.hateoas.core.MethodParameters

public class MethodParameters
extends Object

Value object to represent MethodParameters to allow to easily find the ones with a given annotation.

Author:
Oliver Gierke

Constructor Summary
MethodParameters(Method method)
          Creates a new MethodParameters from the given Method.
MethodParameters(Method method, AnnotationAttribute namingAnnotation)
          Creates a new MethodParameters for the given Method and AnnotationAttribute.
 
Method Summary
 MethodParameter getParameter(String name)
          Returns the MethodParameter with the given name or null if none found.
 List<MethodParameter> getParameters()
          Returns all MethodParameters.
 List<MethodParameter> getParametersOfType(Class<?> type)
          Returns all parameters of the given type.
 List<MethodParameter> getParametersWith(Class<? extends Annotation> annotation)
          Returns all MethodParameters annotated with the given annotation type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodParameters

public MethodParameters(Method method)
Creates a new MethodParameters from the given Method.

Parameters:
method - must not be null.

MethodParameters

public MethodParameters(Method method,
                        AnnotationAttribute namingAnnotation)
Creates a new MethodParameters for the given Method and AnnotationAttribute. If the latter is given, method parameter names will be looked up from the annotation attribute if present.

Parameters:
method - must not be null.
namingAnnotation - can be null.
Method Detail

getParameters

public List<MethodParameter> getParameters()
Returns all MethodParameters.

Returns:

getParameter

public MethodParameter getParameter(String name)
Returns the MethodParameter with the given name or null if none found.

Parameters:
name - must not be null or empty.
Returns:

getParametersOfType

public List<MethodParameter> getParametersOfType(Class<?> type)
Returns all parameters of the given type.

Parameters:
type - must not be null.
Returns:
Since:
0.9

getParametersWith

public List<MethodParameter> getParametersWith(Class<? extends Annotation> annotation)
Returns all MethodParameters annotated with the given annotation type.

Parameters:
annotation - must not be null.
Returns:

Spring Hateoas

Copyright © 2012-2014–2014 Pivotal, Inc.. All rights reserved.