KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > beans > factory > parsing > ProblemReporter


1 /*
2  * Copyright 2002-2007 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.beans.factory.parsing;
18
19 /**
20  * SPI interface allowing tools and other external processes to handle errors
21  * and warnings reported during bean definition parsing.
22  *
23  * @author Rob Harrop
24  * @author Juergen Hoeller
25  * @since 2.0
26  * @see Problem
27  */

28 public interface ProblemReporter {
29
30     /**
31      * Called when a fatal error is encountered during the parsing process.
32      * <p>Implementations must treat the given problem as fatal,
33      * i.e. they have to eventually raise an exception.
34      * @param problem the source of the error (never <code>null</code>)
35      */

36     void fatal(Problem problem);
37
38     /**
39      * Called when an error is encountered during the parsing process.
40      * <p>Implementations may choose to treat errors as fatal.
41      * @param problem the source of the error (never <code>null</code>)
42      */

43     void error(Problem problem);
44
45     /**
46      * Called when a warning is raised during the parsing process.
47      * <p>Warnings are <strong>never</strong> considered to be fatal.
48      * @param problem the source of the warning (never <code>null</code>)
49      */

50     void warning(Problem problem);
51
52 }
53
Popular Tags