All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.stjs.generator.check.Checks Maven / Gradle / Ivy

There is a newer version: 3.3.2.2
Show newest version
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);
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy