Package: org.codehaus.groovy.runtime.typehandling

## [Java] Class GroovyCastException

- org.codehaus.groovy.runtime.typehandling.GroovyCastException

- - ### Constructor Summary

    Constructors
    Constructor and description
    `GroovyCastException (Object objectToCast, Class classToCastTo, Exception cause)` @param objectToCast object we tried to cast
    `GroovyCastException (Object objectToCast, Class classToCastTo)` @param objectToCast object we tried to cast
    `GroovyCastException (String message)` @param message custom Exception message

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class ClassCastException` | `printStackTrace, printStackTrace, printStackTrace, fillInStackTrace, getCause, initCause, toString, getMessage, getSuppressed, getLocalizedMessage, getStackTrace, setStackTrace, addSuppressed, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll`
    `class RuntimeException` | `printStackTrace, printStackTrace, printStackTrace, fillInStackTrace, getCause, initCause, toString, getMessage, getSuppressed, getLocalizedMessage, getStackTrace, setStackTrace, addSuppressed, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### public GroovyCastException(Object objectToCast, Class classToCastTo, Exception cause)

      Parameters:
        `objectToCast` - object we tried to cast
        `classToCastTo` - class we tried to cast to
        `cause` - not kept but we pass on message from this Exception if any

    - #### public GroovyCastException(Object objectToCast, Class classToCastTo)

      Parameters:
        `objectToCast` - object we tried to cast
        `classToCastTo` - class we tried to cast to

    - #### public GroovyCastException(String message)

      Parameters:
        `message` - custom Exception message