/** * Wraps up any pending operations for the current phase * and switches to the next phase. */ public void gotoPhase(int phase) throws CompilationFailedException { if (!this.phaseComplete) { completePhase(); } this.phase = phase; this.phaseComplete = false; }
/** * Initialize the ProcessingUnit to the empty state. */ public ProcessingUnit(CompilerConfiguration configuration, GroovyClassLoader classLoader, ErrorCollector er) { this.phase = Phases.INITIALIZATION; this.configuration = configuration; this.setClassLoader(classLoader); configure((configuration == null ? new CompilerConfiguration() : configuration)); if (er==null) er = new ErrorCollector(getConfiguration()); this.errorCollector = er; }
/** * Writes out a nicely formatted summary of the exception. */ public void write( PrintWriter output, Janitor janitor ) { String description = "General error during " + owner.getPhaseDescription() + ": "; String message = cause.getMessage(); if( message != null ) { output.println( description + message ); } else { output.println( description + cause ); } output.println(); //if (verbose) { cause.printStackTrace(output); //} }
public MultipleCompilationErrorsException(ErrorCollector ec) { super(0, null); if (ec == null) { CompilerConfiguration config = super.getUnit() != null ? super.getUnit().getConfiguration() : new CompilerConfiguration(); collector = new ErrorCollector(config); } else { collector = ec; } }
/** * A synonym for <code>gotoPhase( phase + 1 )</code>. */ public void nextPhase() throws CompilationFailedException { gotoPhase(this.phase + 1); }
/** * Configures its debugging mode and classloader classpath from a given compiler configuration. * This cannot be done more than once due to limitations in {@link java.net.URLClassLoader URLClassLoader}. */ public void configure(CompilerConfiguration configuration) { super.configure(configuration); this.debug = configuration.getDebug(); if (!this.configured && this.classLoader instanceof GroovyClassLoader) { appendCompilerConfigurationClasspathToClassLoader(configuration, (GroovyClassLoader) this.classLoader); } this.configured = true; }
public MultipleCompilationErrorsException(ErrorCollector ec) { super(0, null); if (ec == null) { CompilerConfiguration config = super.getUnit() != null ? super.getUnit().getConfiguration() : new CompilerConfiguration(); collector = new ErrorCollector(config); } else { collector = ec; } }
/** * A synonym for <code>gotoPhase( phase + 1 )</code>. */ public void nextPhase() throws CompilationFailedException { gotoPhase(this.phase + 1); }
/** * Configures its debugging mode and classloader classpath from a given compiler configuration. * This cannot be done more than once due to limitations in {@link java.net.URLClassLoader URLClassLoader}. */ public void configure(CompilerConfiguration configuration) { super.configure(configuration); this.debug = configuration.getDebug(); if (!this.configured && this.classLoader instanceof GroovyClassLoader) { appendCompilerConfigurationClasspathToClassLoader(configuration, (GroovyClassLoader) this.classLoader); } this.configured = true; }
/** * Initialize the ProcessingUnit to the empty state. */ public ProcessingUnit(CompilerConfiguration configuration, GroovyClassLoader classLoader, ErrorCollector er) { this.phase = Phases.INITIALIZATION; this.setClassLoader(classLoader); configure((configuration == null ? new CompilerConfiguration() : configuration)); if (er==null) er = new ErrorCollector(getConfiguration()); this.errorCollector = er; }
public MultipleCompilationErrorsException(ErrorCollector ec) { super(0, null); if (ec == null) { CompilerConfiguration config = super.getUnit() != null ? super.getUnit().getConfiguration() : new CompilerConfiguration(); collector = new ErrorCollector(config); } else { collector = ec; } }
/** * A synonym for <code>gotoPhase( phase + 1 )</code>. */ public void nextPhase() throws CompilationFailedException { gotoPhase(this.phase + 1); }
/** * Configures its debugging mode and classloader classpath from a given compiler configuration. * This cannot be done more than once due to limitations in {@link java.net.URLClassLoader URLClassLoader}. */ public void configure(CompilerConfiguration configuration) { super.configure(configuration); this.debug = configuration.getDebug(); if (!this.configured && this.classLoader instanceof GroovyClassLoader) { appendCompilerConfigurationClasspathToClassLoader(configuration, (GroovyClassLoader) this.classLoader); } this.configured = true; }
/** * Wraps up any pending operations for the current phase * and switches to the next phase. */ public void gotoPhase(int phase) throws CompilationFailedException { if (!this.phaseComplete) { completePhase(); } this.phase = phase; this.phaseComplete = false; }
/** * Writes out a nicely formatted summary of the exception. */ public void write( PrintWriter output, Janitor janitor ) { String description = "General error during " + owner.getPhaseDescription() + ": "; String message = cause.getMessage(); if( message != null ) { output.println( description + message ); } else { output.println( description + cause ); } output.println(); //if (verbose) { cause.printStackTrace(output); //} }
/** * Initialize the ProcessingUnit to the empty state. */ public ProcessingUnit(CompilerConfiguration configuration, GroovyClassLoader classLoader, ErrorCollector er) { this.phase = Phases.INITIALIZATION; this.configuration = configuration; this.setClassLoader(classLoader); configure((configuration == null ? new CompilerConfiguration() : configuration)); if (er==null) er = new ErrorCollector(getConfiguration()); this.errorCollector = er; }
public MultipleCompilationErrorsException(ErrorCollector ec) { super(0, null); if (ec == null) { CompilerConfiguration config = super.getUnit() != null ? super.getUnit().getConfiguration() : new CompilerConfiguration(); collector = new ErrorCollector(config); } else { collector = ec; } }
/** * A synonym for <code>gotoPhase( phase + 1 )</code>. */ public void nextPhase() throws CompilationFailedException { gotoPhase(this.phase + 1); }
/** * Configures its debugging mode and classloader classpath from a given compiler configuration. * This cannot be done more than once due to limitations in {@link java.net.URLClassLoader URLClassLoader}. */ public void configure(CompilerConfiguration configuration) { super.configure(configuration); this.debug = configuration.getDebug(); if (!this.configured && this.classLoader instanceof GroovyClassLoader) { appendCompilerConfigurationClasspathToClassLoader(configuration, (GroovyClassLoader) this.classLoader); } this.configured = true; }
/** * Wraps up any pending operations for the current phase * and switches to the next phase. */ public void gotoPhase(int phase) throws CompilationFailedException { if (!this.phaseComplete) { completePhase(); } this.phase = phase; this.phaseComplete = false; }