FileDocCategorySizeDatePackage
ClassCastException.javaAPI DocAndroid 1.5 API2223Wed May 06 22:41:04 BST 2009java.lang

ClassCastException

public class ClassCastException extends RuntimeException
Thrown when a program attempts to cast a an object to a type with which it is not compatible.
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
Constructors Summary
public ClassCastException()
Constructs a new {@code ClassCastException} that includes the current stack trace.

since
Android 1.0


                        
      
        super();
    
public ClassCastException(String detailMessage)
Constructs a new {@code ClassCastException} with the current stack trace and the specified detail message.

param
detailMessage the detail message for this exception.
since
Android 1.0

        super(detailMessage);
    
ClassCastException(Class instanceClass, Class castClass)
Constructs a new {@code ClassCastException} with the current stack trace and a detail message based on the source and target class.

param
instanceClass the class being cast from.
param
castClass the class being cast to.
since
Android 1.0

        super(Msg.getString("K0340", instanceClass.getName(), castClass //$NON-NLS-1$
                .getName()));
    
Methods Summary