Top Description Fields Constructors Methods
org.springframework.beans.factory.parsing

public Class Problem

extends Object
Class Inheritance
Imports
org.springframework.lang.Nullable, org.springframework.util.Assert

Represents a problem with a bean definition configuration. Mainly serves as common argument passed into a ProblemReporter.

May indicate a potentially fatal problem (an error) or just a warning.

Authors
Rob Harrop, Juergen Hoeller
Since
2.0
See Also
ProblemReporter

Field Summary

Modifier and TypeField and Description
private final Location
private final String
private final ParseState
private final Throwable

Constructor Summary

AccessConstructor and Description
public
Problem(String
a message detailing the problem
message
,
Location
the location within a bean configuration source that triggered the error
location
)

Create a new instance of the Problem class.

public
Problem(String
a message detailing the problem
message
,
Location
the location within a bean configuration source that triggered the error
location
,
ParseState
the ParseState at the time of the error
parseState
)

Create a new instance of the Problem class.

public
Problem(String
a message detailing the problem
message
,
Location
the location within a bean configuration source that triggered the error
location
,
ParseState
the ParseState at the time of the error
parseState
,
Throwable
the underlying exception that caused the error (may be null)
rootCause
)

Create a new instance of the Problem class.

Method Summary

Modifier and TypeMethod and Description
public Location
getLocation()

Get the location within a bean configuration source that triggered the error.

public String
getMessage()

Get the message detailing the problem.

public ParseState
getParseState()

Get the ParseState at the time of the error (may be null).

public String
getResourceDescription()

Get the description of the bean configuration source that triggered the error, as contained within this Problem's Location object.

public Throwable
getRootCause()

Get the underlying exception that caused the error (may be null).

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

locationback to summary
private final Location location
messageback to summary
private final String message
parseStateback to summary
private final ParseState parseState
Annotations
@Nullable
rootCauseback to summary
private final Throwable rootCause
Annotations
@Nullable

Constructor Detail

Problemback to summary
public Problem(String message, Location location)

Create a new instance of the Problem class.

Parameters
message:String

a message detailing the problem

location:Location

the location within a bean configuration source that triggered the error

Problemback to summary
public Problem(String message, Location location, ParseState parseState)

Create a new instance of the Problem class.

Parameters
message:String

a message detailing the problem

location:Location

the location within a bean configuration source that triggered the error

parseState:ParseState

the ParseState at the time of the error

Problemback to summary
public Problem(String message, Location location, ParseState parseState, Throwable rootCause)

Create a new instance of the Problem class.

Parameters
message:String

a message detailing the problem

location:Location

the location within a bean configuration source that triggered the error

parseState:ParseState

the ParseState at the time of the error

rootCause:Throwable

the underlying exception that caused the error (may be null)

Method Detail

getLocationback to summary
public Location getLocation()

Get the location within a bean configuration source that triggered the error.

getMessageback to summary
public String getMessage()

Get the message detailing the problem.

getParseStateback to summary
public ParseState getParseState()

Get the ParseState at the time of the error (may be null).

Annotations
@Nullable
getResourceDescriptionback to summary
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()
getRootCauseback to summary
public Throwable getRootCause()

Get the underlying exception that caused the error (may be null).

Annotations
@Nullable
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override