Java源码示例:spoon.reflect.factory.FactoryImpl
示例1
public TestSpooner() throws Exception {
compiler = new TestSpoonCompiler(
new FactoryImpl(new DefaultCoreFactory(), new StandardEnvironment()));
}
示例2
protected Factory createFactory() {
Factory factory = new FactoryImpl(new DefaultCoreFactory(), new StandardEnvironment());
factory.getEnvironment().setNoClasspath(true);
factory.getEnvironment().setCommentEnabled(false);
return factory;
}
示例3
private static Factory createFactory() {
Environment env = getEnvironment();
Factory factory = new FactoryImpl(new DefaultCoreFactory(), env);
return factory;
}
示例4
public CtStatement createPatchStatementCode(String snippet) {
Factory factory = new FactoryImpl(new DefaultCoreFactory(), new StandardEnvironment());
CtStatement st = (factory).Code().createCodeSnippetStatement(snippet).compile();
return st;
}
示例5
protected Factory createFactory() {
Factory factory = new FactoryImpl(new DefaultCoreFactory(), new StandardEnvironment());
factory.getEnvironment().setNoClasspath(true);
factory.getEnvironment().setCommentEnabled(includeComments);
return factory;
}