private Map<String, String> parseGroupConventionPath( GroupConventionAnnotation groupConventionAnnotation, ProjectConvention projectConvention) { Map<String, String> paths = ImmutableMap.<String, String>builder() .put(PACKAGES_PREFIX, groupConventionAnnotation.groupPackagesPrefix()) .put(PROJECT_ID, projectConvention.id()) .put(GROUP_CONFIG_FOLDER, groupConventionAnnotation.groupConfigFolder()) .put(GROUP_LOG_FOLDER, groupConventionAnnotation.groupLogFolder()) .build(); return matchPath(paths); }
@SuppressWarnings("unchecked") Set<Class<? extends ArgoController>> parseControllers( GroupConventionAnnotation groupConventionAnnotation) { Set<Class<?>> classSet = ClassUtils.getClasses(groupConventionAnnotation.groupPackagesPrefix()); Pattern controllerPattern = Pattern.compile(groupConventionAnnotation.controllerPattern()); ImmutableSet.Builder<Class<? extends ArgoController>> builder = ImmutableSet.builder(); for (Class<?> clazz : classSet) if (applyArgoController(clazz, controllerPattern)) builder.add((Class<? extends ArgoController>) clazz).build(); return builder.build(); }