|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException net.sf.qualitycheck.exception.IllegalPatternArgumentException
public class IllegalPatternArgumentException
Thrown to indicate that a method has been passed a sequence of char
values as argument that does not matches
against the specified pattern. For example, if a method needs a string with a exactly four alphanumeric characters
and is passed with a five characters long string.
Field Summary | |
---|---|
protected static String |
DEFAULT_MESSAGE
Default message to indicate that the a given argument must match against the specified pattern. |
protected static String |
MESSAGE_WITH_NAME
Message to indicate that the the given argument with name must match against the specified pattern. |
protected static String |
NO_PATTERN_PLACEHOLDER
Placeholder for an unset pattern to format a message human readable |
Constructor Summary | |
---|---|
IllegalPatternArgumentException(Pattern pattern)
Constructs an IllegalNullArgumentException with the default message
DEFAULT_MESSAGE including the pattern which the argument must match. |
|
IllegalPatternArgumentException(Pattern pattern,
Throwable cause)
Constructs a new exception with the default message DEFAULT_MESSAGE
including the pattern which the argument must match. |
|
IllegalPatternArgumentException(String argumentName,
Pattern pattern)
Constructs an IllegalNullArgumentException with the message
MESSAGE_WITH_NAME including the given name of the argument as string
representation and pattern which the argument must match. |
|
IllegalPatternArgumentException(String argumentName,
Pattern pattern,
Throwable cause)
Constructs a new exception with the message MESSAGE_WITH_NAME including
the given name as string representation, the pattern which the argument must match and cause. |
Method Summary |
---|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String DEFAULT_MESSAGE
protected static final String MESSAGE_WITH_NAME
protected static final String NO_PATTERN_PLACEHOLDER
Constructor Detail |
---|
public IllegalPatternArgumentException(@Nullable Pattern pattern)
IllegalNullArgumentException
with the default message
DEFAULT_MESSAGE
including the pattern which the argument must match.
pattern
- Pattern, that a string or character sequence should correspond topublic IllegalPatternArgumentException(@Nullable Pattern pattern, @Nullable Throwable cause)
DEFAULT_MESSAGE
including the pattern which the argument must match.
pattern
- Pattern, that a string or character sequence should correspond tocause
- the cause (which is saved for later retrieval by the Throwable.getCause()
method). (A
null
value is permitted, and indicates that the cause is nonexistent or unknown.)public IllegalPatternArgumentException(@Nullable String argumentName, @Nullable Pattern pattern)
IllegalNullArgumentException
with the message
MESSAGE_WITH_NAME
including the given name of the argument as string
representation and pattern which the argument must match.
argumentName
- the name of the passed argumentpattern
- Pattern, that a string or character sequence should correspond topublic IllegalPatternArgumentException(@Nullable String argumentName, @Nullable Pattern pattern, @Nullable Throwable cause)
MESSAGE_WITH_NAME
including
the given name as string representation, the pattern which the argument must match and cause.
argumentName
- the name of the passed argumentpattern
- Pattern, that a string or character sequence should correspond tocause
- the cause (which is saved for later retrieval by the Throwable.getCause()
method). (A
null
value is permitted, and indicates that the cause is nonexistent or unknown.)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |