|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use Class | |
---|---|
java.lang | Provides classes that are fundamental to the design of the Java programming language. |
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects. |
javax.lang.model.element | Interfaces used to model elements of the Java programming language. |
sun.reflect |
Uses of Class in java.lang |
---|
Methods in java.lang that return Class | ||
---|---|---|
|
Class.asSubclass(Class<U> clazz)
Casts this Class object to represent a subclass of the class
represented by the specified class object. |
|
protected Class<?> |
ClassLoader.defineClass(byte[] b,
int off,
int len)
Deprecated. Replaced by defineClass(String, byte[], int, int) |
|
protected Class<?> |
ClassLoader.defineClass(String name,
byte[] b,
int off,
int len)
Converts an array of bytes into an instance of class Class. |
|
protected Class<?> |
ClassLoader.defineClass(String name,
byte[] b,
int off,
int len,
ProtectionDomain protectionDomain)
Converts an array of bytes into an instance of class Class, with an optional ProtectionDomain. |
|
protected Class<?> |
ClassLoader.defineClass(String name,
ByteBuffer b,
ProtectionDomain protectionDomain)
Converts a ByteBuffer
into an instance of class Class,
with an optional ProtectionDomain. |
|
protected Class<?> |
ClassLoader.findClass(String name)
Finds the class with the specified binary name. |
|
protected Class<?> |
ClassLoader.findLoadedClass(String name)
Returns the class with the given binary name if this loader has been recorded by the Java virtual machine as an initiating loader of a class with that binary name. |
|
protected Class<?> |
ClassLoader.findSystemClass(String name)
Finds a class with the specified binary name, loading it if necessary. |
|
static Class<?> |
Class.forName(String className)
Returns the Class object associated with the class or
interface with the given string name. |
|
static Class<?> |
Class.forName(String name,
boolean initialize,
ClassLoader loader)
Returns the Class object associated with the class or
interface with the given string name, using the given class loader. |
|
Class<?>[] |
Class.getClasses()
Returns an array containing Class objects representing all
the public classes and interfaces that are members of the class
represented by this Class object. |
|
Class<?> |
Class.getComponentType()
Returns the Class representing the component type of an
array. |
|
Class<?>[] |
Class.getDeclaredClasses()
Returns an array of Class objects reflecting all the
classes and interfaces declared as members of the class represented by
this Class object. |
|
Class<?> |
Class.getDeclaringClass()
If the class or interface represented by this Class object
is a member of another class, returns the Class object
representing the class in which it was declared. |
|
Class<?> |
Class.getEnclosingClass()
Returns the immediately enclosing class of the underlying class. |
|
Class<?>[] |
Class.getInterfaces()
Determines the interfaces implemented by the class or interface represented by 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 . |
|
Class<?> |
ClassLoader.loadClass(String name)
Loads the class with the specified binary name. |
|
protected Class<?> |
ClassLoader.loadClass(String name,
boolean resolve)
Loads the class with the specified binary name. |
Methods in java.lang with parameters of type Class | ||
---|---|---|
|
Class.asSubclass(Class<U> clazz)
Casts this Class object to represent a subclass of the class
represented by the specified class object. |
|
|
Class.getAnnotation(Class<A> annotationClass)
|
|
Constructor<T> |
Class.getConstructor(Class<?>... parameterTypes)
Returns a Constructor object that reflects the specified
public constructor of the class represented by this Class
object. |
|
Constructor<T> |
Class.getDeclaredConstructor(Class<?>... parameterTypes)
Returns a Constructor object that reflects the specified
constructor of the class or interface represented by this
Class object. |
|
Method |
Class.getDeclaredMethod(String name,
Class<?>... parameterTypes)
Returns a Method object that reflects the specified
declared method of the class or interface represented by this
Class object. |
|
Method |
Class.getMethod(String name,
Class<?>... parameterTypes)
Returns a Method object that reflects the specified public
member method of the class or interface represented by this
Class object. |
|
boolean |
Class.isAnnotationPresent(Class<? extends Annotation> annotationClass)
|
|
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. |
|
protected void |
ClassLoader.resolveClass(Class<?> c)
Links the specified class. |
|
protected void |
ClassLoader.setSigners(Class<?> c,
Object[] signers)
Sets the signers of a class. |
Uses of Class in java.lang.reflect |
---|
Methods in java.lang.reflect with parameters of type Class | ||
---|---|---|
|
Superpackage.getAnnotation(Class<A> annotationClass)
|
|
|
Superpackage.getImportAnnotation(String importName,
Class<A> annotationClass)
Temporary, not in superpackage strawman |
|
boolean |
Superpackage.isAnnotationPresent(Class<? extends Annotation> annotationClass)
|
Uses of Class in javax.lang.model.element |
---|
Methods in javax.lang.model.element with parameters of type Class | ||
---|---|---|
|
Element.getAnnotation(Class<A> annotationType)
Returns this element's annotation for the specified type if such an annotation is present, else null . |
Uses of Class in sun.reflect |
---|
Methods in sun.reflect that return Class | |
---|---|
static Class |
Reflection.getCallerClass(int realFramesToSkip)
Returns the class of the method realFramesToSkip
frames up the stack (zero-based), ignoring frames associated
with java.lang.reflect.Method.invoke() and its implementation. |
Methods in sun.reflect with parameters of type Class | |
---|---|
static void |
Reflection.ensureMemberAccess(Class currentClass,
Class memberClass,
Object target,
int modifiers)
|
static void |
Reflection.ensureMemberAccess(Class currentClass,
Class memberClass,
Object target,
int modifiers)
|
static Field[] |
Reflection.filterFields(Class containingClass,
Field[] fields)
|
static Method[] |
Reflection.filterMethods(Class containingClass,
Method[] methods)
|
static boolean |
Reflection.quickCheckMemberAccess(Class memberClass,
int modifiers)
A quick "fast-path" check to try to avoid getCallerClass() calls. |
static void |
Reflection.registerFieldsToFilter(Class containingClass,
String... fieldNames)
|
static void |
Reflection.registerMethodsToFilter(Class containingClass,
String... methodNames)
|
static boolean |
Reflection.verifyMemberAccess(Class currentClass,
Class memberClass,
Object target,
int modifiers)
|
static boolean |
Reflection.verifyMemberAccess(Class currentClass,
Class memberClass,
Object target,
int modifiers)
|
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |