Java Code Examples for spoon.reflect.factory.FactoryImpl

The following examples show how to use spoon.reflect.factory.FactoryImpl. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: spoon-examples   Source File: TestSpooner.java    License: GNU General Public License v2.0 4 votes vote down vote up
public TestSpooner() throws Exception {
	compiler = new TestSpoonCompiler(
			new FactoryImpl(new DefaultCoreFactory(), new StandardEnvironment()));
}
 
Example 2
Source Project: coming   Source File: CodeFeatureDetectorTest.java    License: MIT License 4 votes vote down vote up
protected Factory createFactory() {
	Factory factory = new FactoryImpl(new DefaultCoreFactory(), new StandardEnvironment());
	factory.getEnvironment().setNoClasspath(true);
	factory.getEnvironment().setCommentEnabled(false);
	return factory;
}
 
Example 3
Source Project: astor   Source File: MutationSupporter.java    License: GNU General Public License v2.0 4 votes vote down vote up
private static Factory createFactory() {
	Environment env = getEnvironment();
	Factory factory = new FactoryImpl(new DefaultCoreFactory(), env);

	return factory;
}
 
Example 4
Source Project: astor   Source File: PatchValidationTest.java    License: GNU General Public License v2.0 4 votes vote down vote up
public CtStatement createPatchStatementCode(String snippet) {

		Factory factory = new FactoryImpl(new DefaultCoreFactory(), new StandardEnvironment());
		CtStatement st = (factory).Code().createCodeSnippetStatement(snippet).compile();
		return st;
	}
 
Example 5
Source Project: gumtree-spoon-ast-diff   Source File: AstComparator.java    License: Apache License 2.0 4 votes vote down vote up
protected Factory createFactory() {
	Factory factory = new FactoryImpl(new DefaultCoreFactory(), new StandardEnvironment());
	factory.getEnvironment().setNoClasspath(true);
	factory.getEnvironment().setCommentEnabled(includeComments);
	return factory;
}