Example usage for org.apache.commons.attributes Attributes getAttributes

List of usage examples for org.apache.commons.attributes Attributes getAttributes

Introduction

In this page you can find the example usage for org.apache.commons.attributes Attributes getAttributes.

Prototype

public static Collection getAttributes(Method method, Class attributeClass) throws RepositoryError 

Source Link

Document

Get all attributes of a given type from a method.

Usage

From source file:org.springframework.web.servlet.handler.metadata.CommonsPathMapHandlerMapping.java

/**
 * Use Commons Attributes to find PathMap attributes for the given class.
 * We know there's at least one, as the getClassNamesWithPathMapAttributes
 * method return this class name.//  ww w  .j a v a 2s  .  c o m
 */
protected PathMap[] getPathMapAttributes(Class handlerClass) {
    Collection atts = Attributes.getAttributes(handlerClass, PathMap.class);
    return (PathMap[]) atts.toArray(new PathMap[atts.size()]);
}