List of usage examples for org.apache.commons.attributes AttributeIndex AttributeIndex
public AttributeIndex(ClassLoader cl) throws Exception
From source file:org.springframework.web.servlet.handler.metadata.CommonsPathMapHandlerMapping.java
/** * Use Commons Attributes AttributeIndex to get a Collection of Class * objects with the required PathMap attribute. Protected so that it can * be overridden during testing.//from w w w . j a v a2 s. com */ protected Class[] getClassesWithPathMapAttributes() throws Exception { AttributeIndex ai = new AttributeIndex(getClass().getClassLoader()); Collection classes = ai.getClasses(PathMap.class); return (Class[]) classes.toArray(new Class[classes.size()]); }