Examples of ModuleKey


Examples of com.alibaba.citrus.service.moduleloader.impl.ModuleKey

    private ModuleKey key;

    @Test
    public void emptyType() {
        try {
            new ModuleKey(null, null);
            fail();
        } catch (IllegalArgumentException e) {
            assertThat(e, exception("moduleType"));
        }

        try {
            new ModuleKey(" ", null);
            fail();
        } catch (IllegalArgumentException e) {
            assertThat(e, exception("moduleType"));
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.service.moduleloader.impl.ModuleKey

    }

    @Test
    public void emptyName() {
        try {
            new ModuleKey("action", null);
            fail();
        } catch (IllegalArgumentException e) {
            assertThat(e, exception("moduleName"));
        }

        try {
            new ModuleKey("action", "  ");
            fail();
        } catch (IllegalArgumentException e) {
            assertThat(e, exception("moduleName"));
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.service.moduleloader.impl.ModuleKey

        }
    }

    @Test
    public void normalize() {
        key = new ModuleKey(" action ", "  aaa_bbb/Ccc/dddEEE  ");

        assertEquals("action", key.getModuleType());
        assertEquals("aaaBbb.ccc.DddEee", key.getModuleName());
    }
View Full Code Here

Examples of com.alibaba.citrus.service.moduleloader.impl.ModuleKey

            if (items.containsKey(itemName)) {
                ParsingModuleInfo item = items.get(itemName);

                // 对于特别创建的bean,补充其type和name信息。
                if (item.bd != null && item.key == null) {
                    item.key = new ModuleKey(type, name);
                }

                // 忽略重复匹配的类
                return false;
            } else {
View Full Code Here

Examples of com.alibaba.citrus.service.moduleloader.impl.ModuleKey

        String    beanName;
        ModuleKey key;

        public ParsingModuleInfo(String moduleType, String moduleName, String itemName) {
            this.bd = null;
            this.key = new ModuleKey(moduleType, moduleName);
            this.itemName = itemName;
        }
View Full Code Here

Examples of com.alibaba.citrus.service.moduleloader.impl.ModuleKey

            if (items.containsKey(itemName)) {
                ParsingModuleInfo item = items.get(itemName);

                // �����ر𴴽���bean��������type��name��Ϣ��
                if (item.bd != null && item.key == null) {
                    item.key = new ModuleKey(type, name);
                }

                // �����ظ�ƥ�����
                return false;
            } else {
View Full Code Here

Examples of com.alibaba.citrus.service.moduleloader.impl.ModuleKey

        String beanName;
        ModuleKey key;

        public ParsingModuleInfo(String moduleType, String moduleName, String itemName) {
            this.bd = null;
            this.key = new ModuleKey(moduleType, moduleName);
            this.itemName = itemName;
        }
View Full Code Here

Examples of org.sugarj.driver.caching.ModuleKey

    }));
   
    for (Path grammarFile : baseLang.getPackagedGrammars()) {
      Map<String, Integer> map = new HashMap<String, Integer>();
      map.put(grammarFile.getAbsolutePath(), FileCommands.fileHash(grammarFile));
      ModuleKey key = new ModuleKey(map, "");
      Path permissiveGrammar = lookupGrammarInCache(sdfCache, key);
      if (permissiveGrammar == null) {
        permissiveGrammar = FileCommands.newTempFile("def");
        makePermissive(new AbsolutePath(grammarFile.getAbsolutePath()), permissiveGrammar);
        permissiveGrammar = cacheParseTable(sdfCache, key, permissiveGrammar, environment);
View Full Code Here

Examples of org.sugarj.driver.caching.ModuleKey

                              Environment environment,
                              AbstractBaseLanguage baseLang) throws IOException,
                                                          InvalidParseTableException,
                                                          TokenExpectedException,
                                                          SGLRException {
    ModuleKey key = getModuleKeyForGrammar(sdf, module, dependentFiles, sdfParser);
    Path tbl = lookupGrammarInCache(sdfCache, key);
    if (tbl == null) {
      tbl = generateParseTable(key, sdf, module, environment.getIncludePath(), sdfCache, environment, baseLang);
      tbl = cacheParseTable(sdfCache, key, tbl, environment);
    }
View Full Code Here

Examples of org.sugarj.driver.caching.ModuleKey

      IStrategoTerm imports = ATermCommands.getApplicationSubterm(aterm, "module", 1);
      IStrategoTerm body = ATermCommands.getApplicationSubterm(aterm, "module", 2);
      IStrategoTerm term = ATermCommands.makeTuple(imports, body);

      return new ModuleKey(dependentFiles, SDF_FILE_PATTERN, term);
    } catch (Exception e) {
      throw new SGLRException(parser, "could not parse SDF file " + sdf, e);
    } finally {
      log.endTask();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.