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(java.lang.String msg)
Initializes me with a user-friendly message describing the nature of
the lookup failure.
|
LookupException(java.lang.String msg,
java.util.List<?> matches)
Initializes me with a user-friendly message describing the nature of
the lookup that resulted in these zero or more matches.
|
LookupException(java.lang.String msg,
java.lang.Object firstMatch,
java.lang.Object secondMatch,
java.lang.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 |
|---|---|
java.util.List<?> |
getAmbiguousMatches()
Obtains the list of ambiguous matches, if the problem was one of
ambiguity, in the order in which they were found.
|
java.util.List<?> |
getMatches()
Obtains all matches, in the order in which they were found.
|
getDiagnosticpublic LookupException(java.lang.String msg)
msg - the exception messagepublic LookupException(java.lang.String msg,
java.util.List<?> matches)
msg - the exception messagematches - the objects found by the lookuppublic LookupException(java.lang.String msg,
java.lang.Object firstMatch,
java.lang.Object secondMatch,
java.lang.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 java.util.List<?> getMatches()
getAmbiguousMatches(),
InvalidLookupException.getInvalidMatch()public java.util.List<?> getAmbiguousMatches()
InvalidLookupException.getInvalidMatch(),
getMatches()