use of org.wildfly.swarm.spi.api.annotations.Configurables in project wildfly-swarm by wildfly-swarm.
the class ConfigurableManager method namesFor.
protected List<ConfigKey> namesFor(ConfigKey prefix, Field field) {
List<ConfigKey> names = new ArrayList<>();
Configurables plural = field.getAnnotation(Configurables.class);
if (plural != null) {
for (Configurable each : plural.value()) {
ConfigKey key = nameFor(prefix, each);
if (key != null) {
names.add(key);
}
}
} else {
Configurable[] annos = field.getAnnotationsByType(Configurable.class);
if (annos != null && annos.length > 0) {
for (Configurable anno : annos) {
ConfigKey key = nameFor(prefix, anno);
if (key != null) {
names.add(key);
}
}
} else {
ConfigKey key = handleDeploymentConfiguration(prefix.append(nameFor(field)));
names.add(key);
}
}
return names;
}
Aggregations