Example #1
0
 private Class<?> findConcreteTypeFrom(Element element, Class<?> interfaceType) {
   for (Class<?> implementation : registry.implementersOf(interfaceType)) {
     if (GoConfigClassLoader.compare(element, implementation, configCache)) {
       return implementation;
     }
   }
   return null;
 }
Example #2
0
  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();
  }