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, getStackTrace, fillInStackTrace, getCause, initCause, toString, getMessage, getSuppressed, getLocalizedMessage, setStackTrace, addSuppressed, equals, hashCode, getClass, notify, notifyAll, wait, wait, wait`
    `class RuntimeException` | `printStackTrace, printStackTrace, printStackTrace, getStackTrace, fillInStackTrace, getCause, initCause, toString, getMessage, getSuppressed, getLocalizedMessage, setStackTrace, addSuppressed, equals, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### 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