Package: org.codehaus.groovy.runtime.typehandling

## [Java] Class GroovyCastException

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

-     public class GroovyCastException
      extends ClassCastException

- - ### Constructor Summary

    Constructors
    Constructor and description
    `GroovyCastException(Object objectToCast, Class classToCastTo, Exception cause)` Parameters: `objectToCast` - object we tried to cast
    `GroovyCastException(Object objectToCast, Class classToCastTo)` Parameters: `objectToCast` - object we tried to cast
    `GroovyCastException(String message)` Parameters: `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, 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