Class Problem
- java.lang.Object
- org.springframework.beans.factory.parsing.Problem
public class Problem extends Object
Represents a problem with a bean definition configuration. Mainly serves as common argument passed into aProblemReporter.May indicate a potentially fatal problem (an error) or just a warning.
- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller
- See Also:
ProblemReporter
Constructor Summary
Constructors Constructor Description Problem(String message, Location location)Create a new instance of theProblemclass.Problem(String message, Location location, ParseState parseState)Create a new instance of theProblemclass.Problem(String message, Location location, ParseState parseState, Throwable rootCause)Create a new instance of theProblemclass.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocationgetLocation()Get the location within a bean configuration source that triggered the error.StringgetMessage()Get the message detailing the problem.ParseStategetParseState()Get theParseStateat the time of the error (may benull).StringgetResourceDescription()Get the description of the bean configuration source that triggered the error, as contained within this Problem's Location object.ThrowablegetRootCause()Get the underlying exception that caused the error (may benull).StringtoString()
Constructor Detail
Problem
public Problem(String message, Location location)
Create a new instance of theProblemclass.- Parameters:
message- a message detailing the problemlocation- the location within a bean configuration source that triggered the error
Problem
public Problem(String message, Location location, ParseState parseState)
Create a new instance of theProblemclass.- Parameters:
message- a message detailing the problemparseState- theParseStateat the time of the errorlocation- the location within a bean configuration source that triggered the error
Problem
public Problem(String message, Location location, ParseState parseState, Throwable rootCause)
Create a new instance of theProblemclass.- Parameters:
message- a message detailing the problemrootCause- the underlying exception that caused the error (may benull)parseState- theParseStateat the time of the errorlocation- the location within a bean configuration source that triggered the error
Method Detail
getMessage
public String getMessage()
Get the message detailing the problem.
getLocation
public Location getLocation()
Get the location within a bean configuration source that triggered the error.
getResourceDescription
public String getResourceDescription()
Get the description of the bean configuration source that triggered the error, as contained within this Problem's Location object.- See Also:
getLocation()
getParseState
public ParseState getParseState()
Get theParseStateat the time of the error (may benull).
getRootCause
public Throwable getRootCause()
Get the underlying exception that caused the error (may benull).