AbstractComponentApiServlet extends AbstractApiServlet { protected static List<Map<String, Object>> getParameters(Class<?> clazz) { List<Map<String, Object>> parametersOutput = new ArrayList<>(); Field[] fields = clazz.getDeclaredFields(); if (fields != null) { for (Field field : fields) { parametersOutput.addAll(processParameters(field)); parametersOutput.addAll(processResources(field)); } } if (clazz.getSuperclass() != null) { parametersOutput.addAll(getParameters(clazz.getSuperclass())); } return parametersOutput; } AbstractComponentApiServlet(
      String componentClass,
      String componentPackage,
      List<String> excludeClass,
      List<String> excludePackage,
      Class<?> clazz); static boolean excludeByPackage(String pkg, List<String> excludePkg); static boolean excludeByClass(Class<?> clazz, List<Class<?>> excludeClazz);  }
@Test public void testGetParameters() throws Exception { List<Map<String, Object>> ret = AbstractComponentApiServlet.getParameters(DummyAnnotator3.class); assertNotNull(ret); assertEquals(3, ret.size()); }
@Test public void testGetResources() throws Exception { List<Map<String, Object>> ret = AbstractComponentApiServlet.getParameters(DummyResourceAnnotator.class); assertNotNull(ret); assertEquals(1, ret.size()); }