Package | Description |
---|---|
java.lang |
Contains core language classes.
|
java.lang.annotation |
Contains core language classes related to compile-time annotations.
|
Modifier and Type | Method and Description |
---|---|
<U> Class<? extends U> |
Class.asSubclass(Class<U> clazz)
Casts this
Class object to represent a subclass of the class
represented by the specified class object. |
static Class<?> |
Class.forName(String className)
Returns the
Class object associated with the class or interface with the given string
name. |
Class<?> |
Object.getClass()
Returns the runtime class of this
Object . |
Class<? super T> |
Class.getSuperclass()
Returns the
Class representing the superclass of the entity (class, interface, primitive
type or void) represented by this Class . |
Modifier and Type | Method and Description |
---|---|
<U> Class<? extends U> |
Class.asSubclass(Class<U> clazz)
Casts this
Class object to represent a subclass of the class
represented by the specified class object. |
boolean |
Class.isAssignableFrom(Class<?> cls)
Determines if the class or interface represented by this
Class object is either the same
as, or is a superclass or superinterface of, the class or interface represented by the specified
Class parameter. |
static <T extends Enum<T>> |
Enum.valueOf(Class<T> enumType,
String name)
This method is available for compilation purpose.
|
Modifier and Type | Method and Description |
---|---|
Class<? extends Annotation> |
Annotation.annotationType()
Returns the annotation type of this annotation.
|