net.sf.qualitycheck.exception
Class IllegalStateOfArgumentException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.sf.qualitycheck.exception.IllegalStateOfArgumentException
All Implemented Interfaces:
Serializable

public class IllegalStateOfArgumentException
extends RuntimeException

Thrown to indicate that a method was passed arguments which caused an invalid state.

Author:
André Rouél, Dominik Seichter
See Also:
Serialized Form

Field Summary
protected static String DEFAULT_MESSAGE
          Default message to indicate that the given arguments caused an invalid state.
protected static String MESSAGE_DESCRIPTION
          Message to indicate that an invalid state was caused due to the passed arguments, which also provides an explanation why the state is invalid.
 
Constructor Summary
IllegalStateOfArgumentException()
          Constructs an IllegalStateOfArgumentException with the default message DEFAULT_MESSAGE.
IllegalStateOfArgumentException(String description)
          Constructs an IllegalStateOfArgumentException with the message MESSAGE_DESCRIPTION including the given values of the arguments.
IllegalStateOfArgumentException(String description, Object... descriptionTemplateArgs)
          Constructs an IllegalStateOfArgumentException with the message MESSAGE_DESCRIPTION including the given values of the arguments.
IllegalStateOfArgumentException(String description, Throwable cause)
          Constructs a new exception with the message MESSAGE_DESCRIPTION including the given values of the arguments.
IllegalStateOfArgumentException(Throwable cause)
          Constructs a new exception with the default message DEFAULT_MESSAGE.
IllegalStateOfArgumentException(Throwable cause, String description, Object... descriptionTemplateArgs)
          Constructs a new exception with the message MESSAGE_DESCRIPTION including the given values of the arguments.
 
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

DEFAULT_MESSAGE

protected static final String DEFAULT_MESSAGE
Default message to indicate that the given arguments caused an invalid state.

See Also:
Constant Field Values

MESSAGE_DESCRIPTION

protected static final String MESSAGE_DESCRIPTION
Message to indicate that an invalid state was caused due to the passed arguments, which also provides an explanation why the state is invalid.

See Also:
Constant Field Values
Constructor Detail

IllegalStateOfArgumentException

public IllegalStateOfArgumentException()
Constructs an IllegalStateOfArgumentException with the default message DEFAULT_MESSAGE.


IllegalStateOfArgumentException

public IllegalStateOfArgumentException(@Nonnull
                                       String description)
Constructs an IllegalStateOfArgumentException with the message MESSAGE_DESCRIPTION including the given values of the arguments.

Parameters:
description - explains why the state is invalid

IllegalStateOfArgumentException

public IllegalStateOfArgumentException(@Nonnull
                                       String description,
                                       Object... descriptionTemplateArgs)
Constructs an IllegalStateOfArgumentException with the message MESSAGE_DESCRIPTION including the given values of the arguments.

Parameters:
description - format string template that explains why the state is invalid
descriptionTemplateArgs - format string template arguments to explain why the state is invalid

IllegalStateOfArgumentException

public IllegalStateOfArgumentException(@Nonnull
                                       String description,
                                       @Nullable
                                       Throwable cause)
Constructs a new exception with the message MESSAGE_DESCRIPTION including the given values of the arguments.

Parameters:
description - explains why the state is invalid
cause - 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.)

IllegalStateOfArgumentException

public IllegalStateOfArgumentException(@Nullable
                                       Throwable cause,
                                       @Nonnull
                                       String description,
                                       Object... descriptionTemplateArgs)
Constructs a new exception with the message MESSAGE_DESCRIPTION including the given values of the arguments.

Parameters:
cause - 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.)
description - format string template that explains why the state is invalid
descriptionTemplateArgs - format string template arguments to explain why the state is invalid

IllegalStateOfArgumentException

public IllegalStateOfArgumentException(@Nullable
                                       Throwable cause)
Constructs a new exception with the default message DEFAULT_MESSAGE.

Parameters:
cause - 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.)


Copyright © 2012-2013. All Rights Reserved.