public class LookupException extends SemanticException
Actual instances of this exception are usually more specific, being either
AmbiguousLookupExceptions or InvalidLookupExceptions.
AmbiguousLookupException,
InvalidLookupException,
Serialized Form| Constructor and Description |
|---|
LookupException(String msg)
Initializes me with a user-friendly message describing the nature of
the lookup failure.
|
LookupException(String msg,
List<?> matches)
Initializes me with a user-friendly message describing the nature of
the lookup that resulted in these zero or more matches.
|
LookupException(String msg,
Object firstMatch,
Object secondMatch,
Object... otherMatches)
Initializes me with a user-friendly message describing the nature of
the lookup failure and at least two objects that were ambiguous matches.
|
| Modifier and Type | Method and Description |
|---|---|
List<?> |
getAmbiguousMatches()
Obtains the list of ambiguous matches, if the problem was one of
ambiguity, in the order in which they were found.
|
List<?> |
getMatches()
Obtains all matches, in the order in which they were found.
|
getDiagnosticaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic LookupException(String msg)
msg - the exception messagepublic LookupException(String msg, List<?> matches)
msg - the exception messagematches - the objects found by the lookuppublic LookupException(String msg, Object firstMatch, Object secondMatch, Object... otherMatches)
msg - the exception messagefirstMatch - the first object found by the look-upsecondMatch - the second object found by the look-upotherMatches - any further objects found by the look-uppublic List<?> getMatches()
getAmbiguousMatches(),
InvalidLookupException.getInvalidMatch()public List<?> getAmbiguousMatches()
InvalidLookupException.getInvalidMatch(),
getMatches()Copyright © 2015 Open eHealth Foundation. All rights reserved.