Klasse InvalidArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ch.nolix.core.errorcontrol.invalidargumentexception.InvalidArgumentException
- Alle implementierten Schnittstellen:
Serializable
- Bekannte direkte Unterklassen:
ArgumentBelongsToParentException
,ArgumentContainsElementException
,ArgumentDoesNotBelongToParentException
,ArgumentDoesNotContainElementException
,ArgumentDoesNotHaveAttributeException
,ArgumentDoesNotSupportMethodException
,ArgumentHasAttributeException
,ArgumentIsInRangeException
,ArgumentIsNotNullException
,ArgumentIsNullException
,ArgumentIsOutOfRangeException
,BiggerArgumentException
,ClosedArgumentException
,DeletedArgumentException
,EmptyArgumentException
,EqualArgumentException
,InvalidPortException
,NegativeArgumentException
,NewArgumentException
,NonEmptyArgumentException
,NonNegativeArgumentException
,NonPositiveArgumentException
,PositiveArgumentException
,ReferencedArgumentException
,SmallerArgumentException
,UnacceptedKeyException
,UnconnectedArgumentException
,UnequalArgumentException
,UnrepresentingArgumentException
,UnsupportedCaseException
A
InvalidArgumentException
is a RuntimeException
that is
supposed to be thrown when a given argument is not valid.
A InvalidArgumentException
stores the name of the argument the
InvalidArgumentException
was created for. A
InvalidArgumentException
stores the argument
InvalidArgumentException
was created for.
The name of a InvalidArgumentException
should be builded according to
one of the following patterns. -[A]ArgumentException
-Non[PA]ArgumentException -Argument[P]Exception Whereas: -[A] is an
adjective. -[PA] is a grammatically positive adjective. -[P] is a predicate.
Examples of names of InvalidArgumentException
s:
-NegativeArgumentException -NonPositiveArgumentException
-ArgumentIsOutOfRangeException- Version:
- 2016-12-01
- Autor:
- Silvan Wyss
- Siehe auch:
-
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotected
InvalidArgumentException
(Object argument) Creates a newInvalidArgumentException
for the given argument.protected
InvalidArgumentException
(Object argument, String errorPredicate) Creates a newInvalidArgumentException
for the given argument and errorPredicate.protected
InvalidArgumentException
(Object argument, String errorPredicate, Throwable cause) Creates a newInvalidArgumentException
for the given argument, errorPredicate and cause.protected
InvalidArgumentException
(String argumentName, Object argument, String errorPredicate) Creates a newInvalidArgumentException
for the given argumentName, argument and errorPredicate.protected
InvalidArgumentException
(String argumentName, Object argument, String errorPredicate, Throwable cause) Creates a newInvalidArgumentException
for the given argumentName, argument, errorPredicate and cause. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic InvalidArgumentException
forArgument
(Object argument) static InvalidArgumentException
forArgumentAndErrorPredicate
(Object argument, String errorPredicate) static InvalidArgumentException
forArgumentAndErrorPredicateAndCause
(Object argument, String errorPredicate, Throwable cause) static InvalidArgumentException
forArgumentNameAndArgument
(String argumentName, Object argument) static InvalidArgumentException
forArgumentNameAndArgumentAndErrorPredicate
(String argumentName, Object argument, String errorPredicate) final String
final String
final Object
Von Klasse geerbte Methoden java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Konstruktordetails
-
InvalidArgumentException
Creates a newInvalidArgumentException
for the given argument.- Parameter:
argument
-
-
InvalidArgumentException
Creates a newInvalidArgumentException
for the given argument and errorPredicate.- Parameter:
argument
-errorPredicate
-- Löst aus:
IllegalArgumentException
- if the given errorPredicate is null.IllegalArgumentException
- if the given errorPredicate is blank.IllegalArgumentException
- if the given errorPredicate ends with a dot.
-
InvalidArgumentException
Creates a newInvalidArgumentException
for the given argument, errorPredicate and cause.- Parameter:
argument
-errorPredicate
-cause
-- Löst aus:
IllegalArgumentException
- if the given errorPredicate is null.IllegalArgumentException
- if the given errorPredicate is blank.IllegalArgumentException
- if the given errorPredicate ends with a dot.IllegalArgumentException
- if the given cause is null.
-
InvalidArgumentException
Creates a newInvalidArgumentException
for the given argumentName, argument and errorPredicate.- Parameter:
argumentName
-argument
-errorPredicate
-- Löst aus:
IllegalArgumentException
- if the given argumentName is null.IllegalArgumentException
- if the given argumentName is blank.IllegalArgumentException
- if the given errorPredicate is null.IllegalArgumentException
- if the given errorPredicate is blank.IllegalArgumentException
- if the given errorPredicate ends with a dot.
-
InvalidArgumentException
protected InvalidArgumentException(String argumentName, Object argument, String errorPredicate, Throwable cause) Creates a newInvalidArgumentException
for the given argumentName, argument, errorPredicate and cause.- Parameter:
argumentName
-argument
-errorPredicate
-cause
-- Löst aus:
IllegalArgumentException
- if the given argumentName is null.IllegalArgumentException
- if the given argumentName is blank.IllegalArgumentException
- if the given errorPredicate is null.IllegalArgumentException
- if the given errorPredicate is blank.IllegalArgumentException
- if the given errorPredicate ends with a dot.IllegalArgumentException
- if the given cause is null.
-
-
Methodendetails
-
forArgument
- Parameter:
argument
-- Gibt zurück:
- a new
InvalidArgumentException
for the given argument.
-
forArgumentAndErrorPredicate
public static InvalidArgumentException forArgumentAndErrorPredicate(Object argument, String errorPredicate) - Parameter:
argument
-errorPredicate
-- Gibt zurück:
- a new
InvalidArgumentException
for the given argument and errorPredicate. - Löst aus:
IllegalArgumentException
- if the given errorPredicate is null.IllegalArgumentException
- if the given errorPredicate is blank.IllegalArgumentException
- if the given errorPredicate ends with a dot.
-
forArgumentAndErrorPredicateAndCause
public static InvalidArgumentException forArgumentAndErrorPredicateAndCause(Object argument, String errorPredicate, Throwable cause) - Parameter:
argument
-errorPredicate
-cause
-- Gibt zurück:
- a new
InvalidArgumentException
for the given argument and errorPredicate. - Löst aus:
IllegalArgumentException
- if the given errorPredicate is null.IllegalArgumentException
- if the given errorPredicate is blank.IllegalArgumentException
- if the given errorPredicate ends with a dot.IllegalArgumentException
- if the given cause is null.
-
forArgumentNameAndArgument
public static InvalidArgumentException forArgumentNameAndArgument(String argumentName, Object argument) - Parameter:
argumentName
-argument
-- Gibt zurück:
- a new
InvalidArgumentException
for the given argumentName and argument. - Löst aus:
IllegalArgumentException
- if the given argumentName is null.IllegalArgumentException
- if the given argumentName is blank.
-
forArgumentNameAndArgumentAndErrorPredicate
public static InvalidArgumentException forArgumentNameAndArgumentAndErrorPredicate(String argumentName, Object argument, String errorPredicate) - Parameter:
argumentName
-argument
-errorPredicate
-- Gibt zurück:
- a new
InvalidArgumentException
for the given argumentName, argument and errorPredicate. - Löst aus:
IllegalArgumentException
- if the given argumentName is null.IllegalArgumentException
- if the given argumentName is blank.IllegalArgumentException
- if the given errorPredicate is null.IllegalArgumentException
- if the given errorPredicate is blank.IllegalArgumentException
- if the given errorPredicate ends with a dot.
-
getArgumentName
- Gibt zurück:
- the name of the argument of the current
InvalidArgumentException
.
-
getErrorPredicate
- Gibt zurück:
- the error predicate of the current
InvalidArgumentException
.
-
getStoredArgument
- Gibt zurück:
- the argument of the current
InvalidArgumentException
.
-