Class

public final class Class extends Object
implements AnnotatedElement GenericDeclaration Serializable Type

Stub implementation of java.lang.Class.

See Also

Public Constructor Summary

Class()

Public Method Summary

<U> Class<? extends U>
asSubclass(Class<U> clazz)
T
cast(Object obj)
boolean
static Class<?>
forName(String name, boolean initialize, ClassLoader loader)
static Class<?>
forName(String className)
<A extends Annotation> A
getAnnotation(Class<A> annotationClass)
Annotation[]
getAnnotations()
Returns annotations that are present on this element.
<T extends Annotation> T[]
getAnnotationsByType(Class<T> annotationClass)
Returns annotations that are associated with this element.
String
ClassLoader
Class[]<?>
Class<?>
Constructor<T>
getConstructor(Class...<?> parameterTypes)
Constructor[]<?>
<T extends Annotation> T
getDeclaredAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is directly present, else null.
Annotation[]
getDeclaredAnnotations()
Returns annotations that are directly present on this element.
<T extends Annotation> T[]
getDeclaredAnnotationsByType(Class<T> annotationClass)
Returns this element's annotation(s) for the specified type if such annotations are either directly present or indirectly present.
Class[]<?>
Constructor<T>
getDeclaredConstructor(Class...<?> parameterTypes)
Constructor[]<?>
Field
Field[]
Method
getDeclaredMethod(String name, Class...<?> parameterTypes)
Method[]
Class<?>
Class<?>
Constructor<?>
Method
T[]
Field
Field[]
Type[]
Type
Class[]<?>
Method
getMethod(String name, Class...<?> parameterTypes)
Method[]
int
String
Package
ProtectionDomain
URL
InputStream