Package org.apache.uima
Interface I18nExceptionI
-
- All Known Implementing Classes:
AnalysisEngineProcessException
,AnnotatorConfigurationException
,AnnotatorContextException
,AnnotatorInitializationException
,AnnotatorProcessException
,CASAdminException
,CASException
,CasProcessorDeploymentException
,CASRuntimeException
,CollectionException
,CPMChunkTimeoutException
,IndexingException
,InvalidXMLException
,LowLevelException
,ResourceAccessException
,ResourceConfigurationException
,ResourceInitializationException
,ResourceProcessException
,ResourceServiceException
,ResultNotSupportedException
,UIMA_IllegalArgumentException
,UIMA_IllegalStateException
,UIMA_UnsupportedOperationException
,UIMAException
,UIMARuntimeException
public interface I18nExceptionI
Like InternationalizedException, but is an interface with default methods.This common set of default implementations are intended to be added to sets of messages collected into exception classes, which implement this, and separately extend one of the 3 superclasses:
- Exception (for checked exceptions)
- RuntimeException (for unchecked exceptions)
- SaxException (for exceptions within XML parsing code
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.Object[]
getArguments()
java.lang.Throwable
getCause()
java.lang.String
getLocalizedMessage()
default java.lang.String
getLocalizedMessage(java.util.Locale aLocale)
Gets the localized detail message for this exception using the specifiedLocale
.java.lang.String
getMessage()
Due to the fact that superclass definitions override any default methods, these next must be in the class definitions as they override other supertype methods.java.lang.String
getMessageKey()
java.lang.String
getResourceBundleName()
default boolean
hasMessageKey(java.lang.String messageKey)
Checks if this exception, or any of its root causes, has a particular UIMA message key.
-
-
-
Method Detail
-
getResourceBundleName
java.lang.String getResourceBundleName()
-
getMessageKey
java.lang.String getMessageKey()
-
getArguments
java.lang.Object[] getArguments()
-
getCause
java.lang.Throwable getCause()
-
getMessage
java.lang.String getMessage()
Due to the fact that superclass definitions override any default methods, these next must be in the class definitions as they override other supertype methods.- Returns:
- -
-
getLocalizedMessage
java.lang.String getLocalizedMessage()
-
getLocalizedMessage
default java.lang.String getLocalizedMessage(java.util.Locale aLocale)
Gets the localized detail message for this exception using the specifiedLocale
.- Parameters:
aLocale
- the locale to use for localizing the message- Returns:
- this exception's detail message, localized for the specified
Locale
.
-
hasMessageKey
default boolean hasMessageKey(java.lang.String messageKey)
Checks if this exception, or any of its root causes, has a particular UIMA message key. This allows checking for particular error condition in test cases- Parameters:
messageKey
- to search for in the exception chain- Returns:
- true if this exception or any of its root causes has a particular UIMA message key.
-
-