|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Code
This interface defines error and exception codes to identify exception classes.
It is intended that this interface is implemented by enumerations that define all or part of these codes for an application.
Since the implementing classes are used as members of exceptions they have to be serializable. Instances of implementing classes should also be immutable.
Method Summary | |
---|---|
String |
getCode() Returns the string representation of the code. |
String |
getComponentId() Returns the component identifier that raised an exception with this code. |
String |
getDisplayId() Returns the string representation of the code. |
String |
toString() Returns the string representation of the code. |
Method Detail |
---|
String getComponentId()
This number enables the system to separate the error codes of different sub systems.
String getCode()
This is the code within the component and lacks the component identifier. If the component is interested in the code, this identifier is used.
String getDisplayId()
This returns the same value as toString()
as this method can be used via property getter.
String toString()
This returns the same value as getDisplayId()
as this makes it easier to print the code in a String
context (e.g. writing to a log file).
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |