org.stjs.generator.check.Checks Maven / Gradle / Ivy
package org.stjs.generator.check;
import java.util.ArrayList;
import java.util.List;
import org.stjs.generator.JavascriptFileGenerationException;
import org.stjs.generator.MultipleFileGenerationException;
/**
* keeps the list of errors found during the check of a Java AST.
*
* @author acraciun
*
*/
public class Checks {
private final List errors = new ArrayList();
public void addError(JavascriptFileGenerationException javascriptFileGenerationException) {
errors.add(javascriptFileGenerationException);
}
public void check() {
// TODO tmp
if (!errors.isEmpty()) {
throw new MultipleFileGenerationException(errors);
}
}
}