Search in sources :

Example 1 with ConfigTag

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;
}
Also used : ConfigTag(com.thoughtworks.go.config.ConfigTag)

Example 2 with ConfigTag

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);
}
Also used : ConfigTag(com.thoughtworks.go.config.ConfigTag)

Example 3 with ConfigTag

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();
}
Also used : GoCipher(com.thoughtworks.go.security.GoCipher) ConfigTag(com.thoughtworks.go.config.ConfigTag)

Example 4 with ConfigTag

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;
}
Also used : ConfigTag(com.thoughtworks.go.config.ConfigTag) ArrayList(java.util.ArrayList)

Aggregations

ConfigTag (com.thoughtworks.go.config.ConfigTag)4 GoCipher (com.thoughtworks.go.security.GoCipher)1 ArrayList (java.util.ArrayList)1