use of org.forgerock.openam.upgrade.UpgradeStepInfo in project OpenAM by OpenRock.
the class UpgradeStepProcessor method process.
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
if (!roundEnv.processingOver()) {
Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(UpgradeStepInfo.class);
for (Element element : elements) {
Set<DependencyInfo> depends = new LinkedHashSet<DependencyInfo>(2);
String annotatedType = element.asType().toString();
UpgradeStepInfo annotation = element.getAnnotation(UpgradeStepInfo.class);
for (String name : annotation.dependsOn()) {
DependencyInfo depInfo = stepMappings.get(name);
if (depInfo == null) {
depInfo = new DependencyInfo(name);
stepMappings.put(name, depInfo);
}
depends.add(depInfo);
}
DependencyInfo depInfo = stepMappings.get(annotatedType);
if (depInfo == null) {
depInfo = new DependencyInfo(annotatedType);
stepMappings.put(annotatedType, depInfo);
}
for (DependencyInfo dep : depends) {
depInfo.dependencies.add(dep);
}
}
createDAG();
}
return true;
}
Aggregations