org.modeshape.common.collection
Class Problem
java.lang.Object
org.modeshape.common.collection.Problem
@Immutable
public class Problem
- extends Object
An immutable representation of a problem, with a status, code, internationalized and parameterized message, values for the
parameters, information about the resource and location, and an optional exception. The use of internationalized messages
allows for automatic localization of the messages (and substitution of the parameter values) via the
getMessageString()
method.
DEFAULT_CODE
public static final int DEFAULT_CODE
- See Also:
- Constant Field Values
Problem
public Problem(Problem.Status status,
int code,
I18n message,
Object[] params,
String resource,
String location,
Throwable throwable)
getCode
public int getCode()
- Returns:
- code
getLocation
public String getLocation()
- Returns:
- location
getMessageString
public String getMessageString()
- Get the message written in the current locale.
- Returns:
- the message
getMessage
public I18n getMessage()
- Returns:
- message
getParameters
public Object[] getParameters()
getResource
public String getResource()
- Returns:
- resource
getStatus
public Problem.Status getStatus()
- Returns:
- status
getThrowable
public Throwable getThrowable()
- Returns:
- throwable
hashCode
public int hashCode()
-
- Overrides:
hashCode
in class Object
- See Also:
Object.hashCode()
equals
public boolean equals(Object obj)
-
- Overrides:
equals
in class Object
- See Also:
Object.equals(java.lang.Object)
toString
public String toString()
-
- Overrides:
toString
in class Object
- See Also:
Object.toString()
Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.