當前位置: 首頁>>代碼示例>>Java>>正文


Java ModelFactory類代碼示例

本文整理匯總了Java中org.aikodi.chameleon.input.ModelFactory的典型用法代碼示例。如果您正苦於以下問題:Java ModelFactory類的具體用法?Java ModelFactory怎麽用?Java ModelFactory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ModelFactory類屬於org.aikodi.chameleon.input包,在下文中一共展示了ModelFactory類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: create

import org.aikodi.chameleon.input.ModelFactory; //導入依賴的package包/類
/**
	 * Create a JLo language object with the following plugins attached:
	 * <ul>
	 *  <li>Syntax: JLoSyntax</li>
	 *  <li>ModelFactory: JLoModelFactory</li>
    *  <li>Factory: JLoFactory</li>
	 *  <li>ObjectOrientedFactory: JLoFactory</li>
	 *  <li>ProjectConfigurator: JLoConfigLoader</li>
	 * </ul>
	 * @return
	 */
	public JLo create() {
		JLo result = new JLo();
		result.setPlugin(ModelFactory.class, new JLoModelFactory());
//    result.setPlugin(ModelFactory.class, new OldJLoModelFactory());
		result.setPlugin(Syntax.class, new JLoSyntax());
		JLoFactory factory = new JLoFactory();
      result.setPlugin(Factory.class, factory);
		result.setPlugin(ObjectOrientedFactory.class, factory);
		result.setPlugin(ExpressionFactory.class, new JavaExpressionFactory());
		result.setPlugin(ProjectConfigurator.class, new JLoProjectConfigurator(Java7LanguageFactory.javaBaseJar()));
		return result;
	}
 
開發者ID:markovandooren,項目名稱:jlo,代碼行數:24,代碼來源:JLoLanguageFactory.java

示例2: create

import org.aikodi.chameleon.input.ModelFactory; //導入依賴的package包/類
/**
  * {@inheritDoc}
  * 
  * <p>The resulting language object has the following plugins:</p>
  * <ol>
  *   <li>{@link ModelFactory} : {@link JavaModelFactory}</li>
  *   <li>{@link Syntax} : {@link Java7Syntax}</li>
  *   <li>{@link Factory} : {@link Java7Factory}</li>
  *   <li>{@link ObjectOrientedFactory} : {@link Java7Factory}</li>
  *   <li>{@link ExpressionFactory} : {@link JavaExpressionFactory}</li>
  *   <li>{@link ProjectConfigurator} : {@link JavaProjectConfigurator}</li>
  * </ol>
  */
public Java7 create() throws ConfigException {
	Java7 result = new Java7();
	result.setPlugin(ModelFactory.class, new JavaModelFactory());
	result.setPlugin(Syntax.class, new Java7Syntax());
	// FIXME: Stupid and inefficient
	result.setPlugin(Factory.class, new Java7Factory());
	result.setPlugin(ObjectOrientedFactory.class, new Java7Factory());
	result.setPlugin(ExpressionFactory.class, new JavaExpressionFactory());
	JarFile jarName = javaBaseJar();
	result.setPlugin(ProjectConfigurator.class, new JavaProjectConfigurator(jarName));
	return result;
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:26,代碼來源:Java7LanguageFactory.java


注:本文中的org.aikodi.chameleon.input.ModelFactory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。