keepStubs = Boolean.TRUE.equals(options.get("keepStubs")); addPhaseOperation(new PrimaryClassNodeOperation() { public void call(SourceUnit source, GeneratorContext context, ClassNode node) throws CompilationFailedException { if (!javaSources.isEmpty()) { addPhaseOperation(new CompilationUnit.PrimaryClassNodeOperation() { public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException { ASTTransformationCollectorCodeVisitor collector = addPhaseOperation(new PrimaryClassNodeOperation() { public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException { try {
public JavaAwareCompilationUnit(CompilerConfiguration configuration, GroovyClassLoader groovyClassLoader) { super(configuration,null,groovyClassLoader); javaSources = new LinkedList(); Map options = configuration.getJointCompilationOptions(); generationGoal = (File) options.get("stubDir"); boolean useJava5 = configuration.getTargetBytecode().equals(CompilerConfiguration.POST_JDK5); stubGenerator = new JavaStubGenerator(generationGoal,false,useJava5); keepStubs = Boolean.TRUE.equals(options.get("keepStubs")); addPhaseOperation(new PrimaryClassNodeOperation() { public void call(SourceUnit source, GeneratorContext context, ClassNode node) throws CompilationFailedException { if (javaSources.size() != 0) new JavaAwareResolveVisitor(JavaAwareCompilationUnit.this).startResolving(node,source); } },Phases.CONVERSION); addPhaseOperation(new PrimaryClassNodeOperation() { public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException { try { if (javaSources.size() != 0) stubGenerator.generateClass(classNode); } catch (FileNotFoundException fnfe) { source.addException(fnfe); } } },Phases.CONVERSION); }
public JavaAwareCompilationUnit(CompilerConfiguration configuration, GroovyClassLoader groovyClassLoader) { super(configuration,null,groovyClassLoader); javaSources = new LinkedList(); Map options = configuration.getJointCompilationOptions(); generationGoal = (File) options.get("stubDir"); boolean useJava5 = configuration.getTargetBytecode().equals(CompilerConfiguration.POST_JDK5); stubGenerator = new JavaStubGenerator(generationGoal,false,useJava5); keepStubs = Boolean.TRUE.equals(options.get("keepStubs")); addPhaseOperation(new PrimaryClassNodeOperation() { public void call(SourceUnit source, GeneratorContext context, ClassNode node) throws CompilationFailedException { if (javaSources.size() != 0) new JavaAwareResolveVisitor(JavaAwareCompilationUnit.this).startResolving(node,source); } },Phases.CONVERSION); addPhaseOperation(new PrimaryClassNodeOperation() { public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException { try { if (javaSources.size() != 0) stubGenerator.generateClass(classNode); } catch (FileNotFoundException fnfe) { source.addException(fnfe); } } },Phases.CONVERSION); }
public JavaAwareCompilationUnit(CompilerConfiguration configuration, GroovyClassLoader groovyClassLoader) { super(configuration,null,groovyClassLoader); javaSources = new LinkedList(); Map options = configuration.getJointCompilationOptions(); generationGoal = (File) options.get("stubDir"); boolean useJava5 = configuration.getTargetBytecode().equals(CompilerConfiguration.POST_JDK5); stubGenerator = new JavaStubGenerator(generationGoal,false,useJava5); keepStubs = Boolean.TRUE.equals(options.get("keepStubs")); addPhaseOperation(new PrimaryClassNodeOperation() { public void call(SourceUnit source, GeneratorContext context, ClassNode node) throws CompilationFailedException { if (javaSources.size() != 0) new JavaAwareResolveVisitor(JavaAwareCompilationUnit.this).startResolving(node,source); } },Phases.CONVERSION); addPhaseOperation(new PrimaryClassNodeOperation() { public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException { try { if (javaSources.size() != 0) stubGenerator.generateClass(classNode); } catch (FileNotFoundException fnfe) { source.addException(fnfe); } } },Phases.CONVERSION); }
public JavaAwareCompilationUnit(CompilerConfiguration configuration, GroovyClassLoader groovyClassLoader, GroovyClassLoader transformClassLoader) { super(configuration,null,groovyClassLoader,transformClassLoader); javaSources = new LinkedList<String>(); Map options = configuration.getJointCompilationOptions(); generationGoal = (File) options.get("stubDir"); boolean useJava5 = configuration.getTargetBytecode().equals(CompilerConfiguration.POST_JDK5); stubGenerator = new JavaStubGenerator(generationGoal,false,useJava5); keepStubs = Boolean.TRUE.equals(options.get("keepStubs")); addPhaseOperation(new PrimaryClassNodeOperation() { public void call(SourceUnit source, GeneratorContext context, ClassNode node) throws CompilationFailedException { if (javaSources.size() != 0) { VariableScopeVisitor scopeVisitor = new VariableScopeVisitor(source); scopeVisitor.visitClass(node); new JavaAwareResolveVisitor(JavaAwareCompilationUnit.this).startResolving(node,source); } } },Phases.CONVERSION); addPhaseOperation(new PrimaryClassNodeOperation() { public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException { try { if (javaSources.size() != 0) stubGenerator.generateClass(classNode); } catch (FileNotFoundException fnfe) { source.addException(fnfe); } } },Phases.CONVERSION); }