Class ArgumentDoesNotBelongToParentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ch.nolix.baseapi.errorcontrol.invalidargumentexception.AbstractInvalidArgumentException
ch.nolix.baseapi.errorcontrol.invalidargumentexception.ArgumentDoesNotBelongToParentException
- All Implemented Interfaces:
Serializable
A
ArgumentDoesNotBelongToParentException is a
AbstractInvalidArgumentException that is supposed to be thrown when a
given argument does undesirably not belong to a parent.- Author:
- Silvan Wyss
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionforArgument(Object argument) forArgumentAndParentType(Object argument, Class<?> parentType) Methods inherited from class AbstractInvalidArgumentException
getArgumentName, getErrorPredicate, getStoredArgumentMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
forArgument
- Parameters:
argument- - Can be null.- Returns:
- a new
ArgumentDoesNotBelongToParentExceptionfor the given argument.
-
forArgumentAndParentType
public static ArgumentDoesNotBelongToParentException forArgumentAndParentType(Object argument, Class<?> parentType) - Parameters:
argument- - Can be null.parentType-- Returns:
- a new
ArgumentDoesNotBelongToParentExceptionfor the given argument and parentType. - Throws:
RuntimeException- if the given parentType is null.
-