org.codehaus.groovy.tools
Class CompilationFailuresException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.codehaus.groovy.GroovyException
              extended byorg.codehaus.groovy.tools.CompilationFailuresException
All Implemented Interfaces:
java.io.Serializable

public class CompilationFailuresException
extends GroovyException

Holds a map of Groovy compilation failures, keyed on source descriptor. Each failure is an ExceptionCollector of exceptions produced during compilation of a particular source. Unlike ExceptionCollector, it never throws itself.

Created and filled by org.codehaus.groovy.tools.Compiler.

Version:
$Revision: 1.1 $
Author:
Chris Poirier
See Also:
Serialized Form

Constructor Summary
CompilationFailuresException()
          Creates an empty exception.
 
Method Summary
 void add(java.lang.String source, ExceptionCollector exceptions)
          Adds a ExceptionCollector to the set.
 ExceptionCollector get(java.lang.String source)
          Returns the ExceptionCollector for the specified source, or null.
 java.lang.String getMessage()
          Returns a string summary of the exception set.
 boolean isEmpty()
          Returns true if the collector is empty.
 java.util.Iterator iterator()
          Returns an Iterator to the keys in the set.
 void merge(CompilationFailuresException other)
          Merges in data from another set.
 int size()
          Returns the number of sources in the set.
 java.lang.String toString()
          Returns a string representation of the exception set.
 int total()
          Returns the number of exceptions in the set.
 
Methods inherited from class org.codehaus.groovy.GroovyException
isFatal, setFatal
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompilationFailuresException

public CompilationFailuresException()
Creates an empty exception.

Method Detail

add

public void add(java.lang.String source,
                ExceptionCollector exceptions)
Adds a ExceptionCollector to the set. Old values will be merged.


merge

public void merge(CompilationFailuresException other)
Merges in data from another set. Old values will be merged.


isEmpty

public boolean isEmpty()
Returns true if the collector is empty.


size

public int size()
Returns the number of sources in the set.


total

public int total()
Returns the number of exceptions in the set.


iterator

public java.util.Iterator iterator()
Returns an Iterator to the keys in the set.


get

public ExceptionCollector get(java.lang.String source)
Returns the ExceptionCollector for the specified source, or null.


getMessage

public java.lang.String getMessage()
Returns a string summary of the exception set.


toString

public java.lang.String toString()
Returns a string representation of the exception set.



Copyright © 2003-2004 The Codehaus. All Rights Reserved.