Пример #1
0
        @Override
        public Invokable invoke(Invokation invokation, Object... parameters) {
          String interfaceName = parameters[0].toString();
          Invokable body = (Invokable) parameters[1];

          ResourceKey key = new ResourceKey("", META_INF_SERVICES + interfaceName);
          AppendServiceFile servicesFile = getFiles().appendResourceFiles.get(key);
          body.invoke(new Invokation(servicesFile.consumer));
          return null;
        }
Пример #2
0
        @Override
        public Invokable invoke(Invokation invokation, Object... parameters) {
          String packageName = parameters[0].toString();
          String simpleName = parameters[1].toString();
          Invokable body = (Invokable) parameters[2];

          ResourceKey key = new ResourceKey(packageName, simpleName);
          SourceFile javaFile = getFiles().sourceFiles.get(key);
          body.invoke(new Invokation(javaFile.consumer));
          javaFile.complete();
          return null;
        }