Spring Framework FailFastProblemReporter - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework FailFastProblemReporter class.

This code example shows how to use the following methods:
/** 
 * @author Dan Oxlade 
 */ 
class ParserTestUtil { 
    static ParserContext createFakeParserContext() {
        return new ParserContext(new XmlReaderContext(thisClassAsResource(), new FailFastProblemReporter(), null, null, null, null), null);
    } 
 
    static InputStreamResource thisClassAsResource() {
        return new InputStreamResource(ParserTestUtil.class.getResourceAsStream(ParserTestUtil.class.getSimpleName() + ".class"));
    } 
 
 
    static org.w3c.dom.Document loadXMLFrom(String xml)
            throws org.xml.sax.SAXException, java.io.IOException {
        return loadXMLFrom(new java.io.ByteArrayInputStream(xml.getBytes()));
    } 
 
    static org.w3c.dom.Document loadXMLFrom(java.io.InputStream is)
            throws org.xml.sax.SAXException, java.io.IOException {
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 * A very simple extension to {@link org.springframework.beans.factory.parsing.FailFastProblemReporter} 
 * that intercepts errors related to missing definition parsers to give a more helpful message. 
 * In the future we may want to replace this by something more sophisticated that allows 
 * different problems to be resolved by different "pluggable" components... 
 */ 
public class MissingParserProblemReporter extends FailFastProblemReporter
{ 
 
    public static final String NO_PARSER_PREFIX = "Cannot locate BeanDefinitionParser";
 
    @Override 
    public void fatal(Problem problem)
    { 
        if (isMissingParser(problem))
        { 
            problem = extendProblemDetails(problem);
        } 
        super.fatal(problem);
    } 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	 * <p>The default implementation is {@link org.springframework.beans.factory.parsing.FailFastProblemReporter} 
	 * which exhibits fail fast behaviour. External tools can provide an alternative implementation 
	 * that collates errors and warnings for display in the tool UI. 
	 */ 
	public void setProblemReporter(ProblemReporter problemReporter) {
		this.problemReporter = (problemReporter != null ? problemReporter : new FailFastProblemReporter());
	} 
 
	/** 
	 * Specify which {@link ReaderEventListener} to use. 
	 * <p>The default implementation is EmptyReaderEventListener which discards every event notification. 
	 * External tools can provide an alternative implementation to monitor the components being 
	 * registered in the BeanFactory. 
	 */ 
	public void setEventListener(ReaderEventListener eventListener) {
		this.eventListener = (eventListener != null ? eventListener : new EmptyReaderEventListener());
	} 
 
	/** 
	 * Specify the {@link SourceExtractor} to use. 
4
CodeRank
Experience pair programming with AI  Get Codota for Java