use of com.thoughtworks.go.config.ConfigTag in project gocd by gocd.
the class GoConfigClassLoader method configTag.
public static ConfigTag configTag(Class<?> type, ConfigCache configCache) {
ConfigTag tag = annotationFor(type, ConfigTag.class);
bombIfNull(tag, "Invalid type '" + type + "' to autoload. Must have ConfigTag annotation.");
return tag;
}
use of com.thoughtworks.go.config.ConfigTag in project gocd by gocd.
the class GoConfigClassLoader method atElement.
private boolean atElement() {
ConfigTag annotation = annotationFor(aClass, ConfigTag.class);
String tag = annotation.value();
return configUtil.atTag(e, tag);
}
use of com.thoughtworks.go.config.ConfigTag in project gocd by gocd.
the class GoConfigSubtagLoader method parse.
public Object parse() {
Class<?> type = findTypeOfField();
if (type == null) {
return null;
}
ConfigTag tag = GoConfigClassLoader.configTag(type, configCache);
if (configUtil.optionalAndMissingTag(e, tag, findSubTag(field).optional())) {
return null;
}
return GoConfigClassLoader.classParser(configUtil.getChild(e, tag), type, configCache, new GoCipher(), registry, configReferenceElements).parse();
}
use of com.thoughtworks.go.config.ConfigTag in project gocd by gocd.
the class ConfigUtil method allTasks.
public static List<String> allTasks(ConfigElementImplementationRegistry registry) {
List<String> allTasks = new ArrayList<>();
for (Class<? extends Task> task : registry.implementersOf(Task.class)) {
ConfigTag tag = task.getAnnotation(ConfigTag.class);
allTasks.add(tag.value());
}
return allTasks;
}