当前位置: 首页>>代码示例>>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;未经允许,请勿转载。