![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e63. Getting the Superclass of a Class ObjectClass cls = java.lang.String.class; Class sup = cls.getSuperclass(); // java.lang.Object cls = java.lang.Object.class; sup = cls.getSuperclass(); // null // The superclass of interfaces is always null cls = java.lang.Cloneable.class; sup = cls.getSuperclass(); // null // The superclass of primitive types is always null cls = int.class; sup = cls.getSuperclass(); // null
e60. Getting the Name of a Class Object e61. Determining If a Class Object Represents a Class or Interface e62. Getting the Superclass of an Object e64. Listing the Interfaces That a Class Implements e65. Listing the Interfaces That an Interface Extends e66. Getting the Package of a Class e67. Determining from Where a Class Was Loaded e68. Loading a Class That Is Not on the Classpath e69. Dynamically Reloading a Modified Class
© 2002 Addison-Wesley. |