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 problem message

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class ClassCastException` | `addSuppressed, equals, fillInStackTrace, getCause, getClass, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, hashCode, initCause, notify, notifyAll, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString, 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 problem message