Java Card 2.1 Platform
Final Revision 1.0

java.lang
Class ClassCastException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.ClassCastException

public class ClassCastException
extends RuntimeException

A JCRE owned instance of ClassCastException is thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For example, the following code generates a ClassCastException:

        Object x = new OwnerPIN( (byte)3, (byte)8);
        JCSystem.getAppletShareableInterfaceObject( (AID)x, (byte)5 );
 

JCRE owned instances of exception classes are temporary JCRE Entry Point Objects and can be accessed from any applet context. References to these temporary objects cannot be stored in class variables or instance variables or array components. See Java Card Runtime Environment (JCRE) 2.1 Specification for details.

This Java Card class's functionality is a strict subset of the definition in the Java Platform Core API Specification.


Constructor Summary
ClassCastException()
          Constructs a ClassCastException.
 
Methods inherited from class java.lang.Object
equals
 

Constructor Detail

ClassCastException

public ClassCastException()
Constructs a ClassCastException.

Submit a bug or feature

Java and Java Card are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc.
901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
All Rights Reserved.