# Class InvalidParameterTypeException

Object
Throwable
Exception
RuntimeException
IllegalStateException
InvalidParameterTypeException

All Implemented Interfaces:
  `Serializable`

public class InvalidParameterTypeException extends IllegalStateException
Thrown by `ParameterValue` getter methods when a value cannot be casted to the requested type. For example this exception is thrown when `ParameterValue​.doubleValue()` is invoked but the value is not convertible to a `double`.

Since:
  1.0
See Also:
  - `ParameterValue​.intValue()`
  - `ParameterValue​.doubleValue()`
  - `ParameterValue​.booleanValue()`
  - `ParameterValue​.stringValue()`
  - `ParameterValue​.valueFile()`
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InvalidParameterTypeException(String message, String parameterName)`
  Creates an exception with the specified message and parameter name.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getParameterName()`
  Returns the parameter name.

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### InvalidParameterTypeException

    public InvalidParameterTypeException(String message, String parameterName)
    Creates an exception with the specified message and parameter name.
    Parameters:
      `message` - The detail message. The detail message is saved for later retrieval by the `Throwable​.getMessage()` method.
      `parameterName` - The parameter name.

- ## Method Details

  - ### getParameterName

    public String getParameterName()
    Returns the parameter name.
    Returns:
      The parameter name.