|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.sdm.quasar.client.core.common.util.AbstractNamedCheckedException
A base class that implements com.dcag.s55.gool.err.NamedException
and extends Exception (for checked exceptions).
| Field Summary |
| Fields inherited from interface com.sdm.quasar.client.core.common.util.NamedException |
EXCEPTION_TYPE_EXCEPTION, EXCEPTION_TYPE_INFO, EXCEPTION_TYPE_WARNING |
| Constructor Summary | |
AbstractNamedCheckedException(java.lang.String id)
Creates a new AbstractNamedCheckedException. |
|
AbstractNamedCheckedException(java.lang.String id,
java.lang.Throwable cause)
Creates a new AbstractNamedCheckedException. |
|
| Method Summary | |
protected static void |
assertIsContained(java.lang.String id,
java.lang.String[] valid_ids)
Throws an IllegalArgumentException, if the given id is not
contained in the list of valid id's given. |
java.util.Map |
getArgs()
Returns all arguments of the exception. |
protected static int |
getArrayIndex(java.lang.String id,
java.lang.String[] valid_ids)
Returns the index of the given identifier in the array of valid id's. |
protected static java.lang.String |
getClassName(java.lang.Class cls)
Returns the class name only (without the package name) of the given Class. |
java.lang.String |
getID()
Returns the exception identifier of the exception (never null).
|
protected static java.lang.String |
getIDFromIndex(int id_index,
java.lang.String[] valid_ids)
Returns the string identifier for the given integer identifier. |
java.lang.String |
getMessage()
|
java.lang.String |
getName()
Returns the full name of this exception (never null).
|
int |
getType()
Returns the exception type. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.sdm.quasar.client.core.common.util.NamedException |
getUnlocalizedMessagePattern |
| Constructor Detail |
public AbstractNamedCheckedException(java.lang.String id,
java.lang.Throwable cause)
AbstractNamedCheckedException.
id - the exception identifier (not null)public AbstractNamedCheckedException(java.lang.String id)
AbstractNamedCheckedException.
id - the exception identifier (not null)| Method Detail |
public java.lang.String getID()
NamedExceptionnull).
The exception identifier is a string that differs between various
instances of the same exception class.
getID in interface NamedExceptionpublic java.lang.String getName()
NamedExceptionnull).
The name should be unique for all implementations (??instances??) of
NamedException. The first part should be the class name
(without package name) followed by a dot (".") and the exception
name. This name will be used to localize the exception.
getName in interface NamedExceptionpublic java.util.Map getArgs()
NamedException
getArgs in interface NamedExceptionnull).public int getType()
NamedException.EXCEPTION_TYPE_EXCEPTION as
exception type.
getType in interface NamedExceptionpublic java.lang.String getMessage()
protected static final java.lang.String getClassName(java.lang.Class cls)
Class.
cls - the Class to extract class name of
protected static final java.lang.String getIDFromIndex(int id_index,
java.lang.String[] valid_ids)
IllegalArgumentException
is thrown
id_index - the id as integervalid_ids - the array with all valid string identifiers. The integer
is treated as index of this array
java.lang.IllegalArgumentException - if the integer id is not valid
protected static final void assertIsContained(java.lang.String id,
java.lang.String[] valid_ids)
IllegalArgumentException, if the given id is not
contained in the list of valid id's given. This method might be used by
subclass to ensure, that their constructor will be called only with valid
id's (in the case subclasses do not hardcode the id per constructor).
id - the identifier to checkvalid_ids - the array of valid identifiers
java.lang.IllegalArgumentException - if the given name is not contained in the list
of valid names
protected static final int getArrayIndex(java.lang.String id,
java.lang.String[] valid_ids)
id - the identifier to get the index forvalid_ids - the array of valid identifiers to search index in
id in the array or -1
if the is is not contained (or null)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||