Build 1.0_r1(from source)

java.lang
Class ClassCastException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.ClassCastException
All Implemented Interfaces:
Serializable

public class ClassCastException
extends RuntimeException

This runtime exception is thrown when a program attempts to cast a an object to a type which it is not compatible with.

See Also:
Serialized Form

Constructor Summary
ClassCastException()
          Constructs a new instance of this class with its walkback filled in.
ClassCastException(Class<?> instanceClass, Class<?> castClass)
          Constructs a new instance of this class with its walkback and message filled in.
ClassCastException(String detailMessage)
          Constructs a new instance of this class with its walkback and message filled in.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassCastException

public ClassCastException()
Constructs a new instance of this class with its walkback filled in.


ClassCastException

public ClassCastException(String detailMessage)
Constructs a new instance of this class with its walkback and message filled in.

Parameters:
detailMessage - String The detail message for the exception.

ClassCastException

ClassCastException(Class<?> instanceClass,
                   Class<?> castClass)
Constructs a new instance of this class with its walkback and message filled in.

Parameters:
instanceClass - Class The class being cast from.
castClass - Class The class being cast to.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature