## Uses of Class
java.lang.Class

- Packages that use Class
  Package | Description
  --- | ---
  java.lang |
  java.lang.annotation |
  java.lang.invoke |
  java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
  java.net |
  java.util |
  org.apidesign.vm4brwsr.api |

- - ### Uses of Class in java.lang

    Fields in java.lang declared as Class
    Modifier and Type | Field and Description
    --- | ---
    `static Class<Void>` | Void.`TYPE` The `Class` object representing the pseudo-type corresponding to the keyword `void`.
    `static Class<Short>` | Short.`TYPE` The `Class` instance representing the primitive type `short`.
    `static Class<Long>` | Long.`TYPE` The `Class` instance representing the primitive type `long`.
    `static Class<Integer>` | Integer.`TYPE` The `Class` instance representing the primitive type `int`.
    `static Class<Float>` | Float.`TYPE` The `Class` instance representing the primitive type `float`.
    `static Class<Double>` | Double.`TYPE` The `Class` instance representing the primitive type `double`.
    `static Class<Character>` | Character.`TYPE` The `Class` instance representing the primitive type `char`.
    `static Class<Byte>` | Byte.`TYPE` The `Class` instance representing the primitive type `byte`.
    `static Class<Boolean>` | Boolean.`TYPE` The Class object representing the primitive type boolean.

    Methods in java.lang that return 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.
    `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.`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.
    `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<?>` | Object.`getClass()` Returns the runtime class of this `Object`.
    `Class<?>` | Class.`getComponentType()` Returns the `Class` representing the component type of an array.
    `Class<E>` | Enum.`getDeclaringClass()` Returns the Class object corresponding to this enum constant's enum type.
    `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.`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
    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.
    `protected abstract T` | ClassValue.`computeValue(Class<?> type)` Computes the given class's derived value for this `ClassValue`.
    `T` | ClassValue.`get(Class<?> type)` Returns the value for the given class.
    `<A extends Annotation> A` | 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)` Bck2Brwsr emulation can only seek public methods, otherwise it throws a `SecurityException`.
    `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.
    `void` | ClassValue.`remove(Class<?> type)` Removes the associated value for the given class.
    `protected void` | ClassLoader.`resolveClass(Class<?> c)` Links the specified class.
    `protected void` | ClassLoader.`setSigners(Class<?> c, Object[] signers)` Sets the signers of a class.
    `static <T extends Enum<T>> T` | Enum.`valueOf(Class<T> enumType, String name)` Returns the enum constant of the specified enum type with the specified name.

  - ### Uses of Class in java.lang.annotation

    Methods in java.lang.annotation that return Class
    Modifier and Type | Method and Description
    --- | ---
    `Class<? extends Annotation>` | Annotation.`annotationType()` Returns the annotation type of this annotation.

  - ### Uses of Class in java.lang.invoke

    Methods in java.lang.invoke that return Class
    Modifier and Type | Method and Description
    --- | ---
    `Class<?>` | MethodHandles.Lookup.`lookupClass()` Tells which class is performing the lookup.
    `Class<?>[]` | MethodType.`parameterArray()` Presents the parameter types as an array (a convenience method).
    `Class<?>` | MethodType.`parameterType(int num)` Returns the parameter type at the specified index, within this method type.
    `Class<?>` | MethodType.`returnType()` Returns the return type of this method type.

    Methods in java.lang.invoke that return types with arguments of type Class
    Modifier and Type | Method and Description
    --- | ---
    `List<Class<?>>` | MethodType.`parameterList()` Presents the parameter types as a list (a convenience method).

    Methods in java.lang.invoke with parameters of type Class
    Modifier and Type | Method and Description
    --- | ---
    `MethodType` | MethodType.`appendParameterTypes(Class<?>... ptypesToInsert)` Finds or creates a method type with additional parameter types.
    `MethodHandle` | MethodHandle.`asCollector(Class<?> arrayType, int arrayLength)` Makes an array-collecting method handle, which accepts a given number of trailing positional arguments and collects them into an array argument.
    `MethodHandle` | MethodHandle.`asSpreader(Class<?> arrayType, int arrayLength)` Makes an array-spreading method handle, which accepts a trailing array argument and spreads its elements as positional arguments.
    `MethodHandle` | MethodHandle.`asVarargsCollector(Class<?> arrayType)` Makes a variable arity adapter which is able to accept any number of trailing positional arguments and collect them into an array argument.
    `MethodType` | MethodType.`changeParameterType(int num, Class<?> nptype)` Finds or creates a method type with a single different parameter type.
    `MethodType` | MethodType.`changeReturnType(Class<?> nrtype)` Finds or creates a method type with a different return type.
    `MethodHandle` | MethodHandles.Lookup.`findConstructor(Class<?> refc, MethodType type)` Produces a method handle which creates an object and initializes it, using the constructor of the specified type.
    `MethodHandle` | MethodHandles.Lookup.`findGetter(Class<?> refc, String name, Class<?> type)` Produces a method handle giving read access to a non-static field.
    `MethodHandle` | MethodHandles.Lookup.`findGetter(Class<?> refc, String name, Class<?> type)` Produces a method handle giving read access to a non-static field.
    `MethodHandle` | MethodHandles.Lookup.`findSetter(Class<?> refc, String name, Class<?> type)` Produces a method handle giving write access to a non-static field.
    `MethodHandle` | MethodHandles.Lookup.`findSetter(Class<?> refc, String name, Class<?> type)` Produces a method handle giving write access to a non-static field.
    `MethodHandle` | MethodHandles.Lookup.`findSpecial(Class<?> refc, String name, MethodType type, Class<?> specialCaller)` Produces an early-bound method handle for a virtual method.
    `MethodHandle` | MethodHandles.Lookup.`findSpecial(Class<?> refc, String name, MethodType type, Class<?> specialCaller)` Produces an early-bound method handle for a virtual method.
    `MethodHandle` | MethodHandles.Lookup.`findStatic(Class<?> refc, String name, MethodType type)` Produces a method handle for a static method.
    `MethodHandle` | MethodHandles.Lookup.`findStaticGetter(Class<?> refc, String name, Class<?> type)` Produces a method handle giving read access to a static field.
    `MethodHandle` | MethodHandles.Lookup.`findStaticGetter(Class<?> refc, String name, Class<?> type)` Produces a method handle giving read access to a static field.
    `MethodHandle` | MethodHandles.Lookup.`findStaticSetter(Class<?> refc, String name, Class<?> type)` Produces a method handle giving write access to a static field.
    `MethodHandle` | MethodHandles.Lookup.`findStaticSetter(Class<?> refc, String name, Class<?> type)` Produces a method handle giving write access to a static field.
    `MethodHandle` | MethodHandles.Lookup.`findVirtual(Class<?> refc, String name, MethodType type)` Produces a method handle for a virtual method.
    `MethodHandles.Lookup` | MethodHandles.Lookup.`in(Class<?> requestedLookupClass)` Creates a lookup on the specified new lookup class.
    `MethodType` | MethodType.`insertParameterTypes(int num, Class<?>... ptypesToInsert)` Finds or creates a method type with additional parameter types.
    `static MethodType` | MethodType.`methodType(Class<?> rtype)` Finds or creates a method type with the given components.
    `static MethodType` | MethodType.`methodType(Class<?> rtype, Class<?> ptype0)` Finds or creates a method type with the given components.
    `static MethodType` | MethodType.`methodType(Class<?> rtype, Class<?> ptype0)` Finds or creates a method type with the given components.
    `static MethodType` | MethodType.`methodType(Class<?> rtype, Class<?>[] ptypes)` Finds or creates an instance of the given method type.
    `static MethodType` | MethodType.`methodType(Class<?> rtype, Class<?>[] ptypes)` Finds or creates an instance of the given method type.
    `static MethodType` | MethodType.`methodType(Class<?> rtype, Class<?> ptype0, Class<?>... ptypes)` Finds or creates a method type with the given components.
    `static MethodType` | MethodType.`methodType(Class<?> rtype, Class<?> ptype0, Class<?>... ptypes)` Finds or creates a method type with the given components.
    `static MethodType` | MethodType.`methodType(Class<?> rtype, Class<?> ptype0, Class<?>... ptypes)` Finds or creates a method type with the given components.
    `static MethodType` | MethodType.`methodType(Class<?> rtype, List<Class<?>> ptypes)` Finds or creates a method type with the given components.
    `static MethodType` | MethodType.`methodType(Class<?> rtype, MethodType ptypes)` Finds or creates a method type with the given components.
    `static <T extends Member> T` | MethodHandles.`reflectAs(Class<T> expected, MethodHandle target)` Performs an unchecked "crack" of a direct method handle.
    `MethodHandle` | MethodHandles.Lookup.`unreflectSpecial(Method m, Class<?> specialCaller)` Produces a method handle for a reflected method.

    Method parameters in java.lang.invoke with type arguments of type Class
    Modifier and Type | Method and Description
    --- | ---
    `MethodType` | MethodType.`appendParameterTypes(List<Class<?>> ptypesToInsert)` Finds or creates a method type with additional parameter types.
    `MethodType` | MethodType.`insertParameterTypes(int num, List<Class<?>> ptypesToInsert)` Finds or creates a method type with additional parameter types.
    `static MethodType` | MethodType.`methodType(Class<?> rtype, List<Class<?>> ptypes)` Finds or creates a method type with the given components.

    Constructors in java.lang.invoke with parameters of type Class
    Constructor and Description
    `SerializedLambda(Class<?> capturingClass, String functionalInterfaceClass, String functionalInterfaceMethodName, String functionalInterfaceMethodSignature, int implMethodKind, String implClass, String implMethodName, String implMethodSignature, String instantiatedMethodType, Object[] capturedArgs)` Create a `SerializedLambda` from the low-level information present at the lambda factory site.

  - ### Uses of Class in java.lang.reflect

    Methods in java.lang.reflect that return Class
    Modifier and Type | Method and Description
    --- | ---
    `Class<?>` | Method.`getDeclaringClass()` Returns the `Class` object representing the class or interface that declares the method represented by this `Method` object.
    `Class<?>` | Member.`getDeclaringClass()` Returns the Class object representing the class or interface that declares the member or constructor represented by this Member.
    `Class<?>` | Field.`getDeclaringClass()` Returns the `Class` object representing the class or interface that declares the field represented by this `Field` object.
    `Class<T>` | Constructor.`getDeclaringClass()` Returns the `Class` object representing the class that declares the constructor represented by this `Constructor` object.
    `Class<?>[]` | Method.`getExceptionTypes()` Returns an array of `Class` objects that represent the types of the exceptions declared to be thrown by the underlying method represented by this `Method` object.
    `Class<?>[]` | Constructor.`getExceptionTypes()` Returns an array of `Class` objects that represent the types of exceptions declared to be thrown by the underlying constructor represented by this `Constructor` object.
    `Class<?>[]` | Method.`getParameterTypes()` Returns an array of `Class` objects that represent the formal parameter types, in declaration order, of the method represented by this `Method` object.
    `Class<?>[]` | Constructor.`getParameterTypes()` Returns an array of `Class` objects that represent the formal parameter types, in declaration order, of the constructor represented by this `Constructor` object.
    `static Class<?>` | Proxy.`getProxyClass(ClassLoader loader, Class<?>... interfaces)` Returns the `java.lang.Class` object for a proxy class given a class loader and an array of interfaces.
    `Class<?>` | Method.`getReturnType()` Returns a `Class` object that represents the formal return type of the method represented by this `Method` object.
    `Class<?>` | Field.`getType()` Returns a `Class` object that identifies the declared type for the field represented by this `Field` object.

    Methods in java.lang.reflect with parameters of type Class
    Modifier and Type | Method and Description
    --- | ---
    `<T extends Annotation> T` | Method.`getAnnotation(Class<T> annotationClass)`
    `<T extends Annotation> T` | Field.`getAnnotation(Class<T> annotationClass)`
    `<T extends Annotation> T` | Constructor.`getAnnotation(Class<T> annotationClass)`
    `<T extends Annotation> T` | AnnotatedElement.`getAnnotation(Class<T> annotationClass)` Returns this element's annotation for the specified type if such an annotation is present, else null.
    `<T extends Annotation> T` | AccessibleObject.`getAnnotation(Class<T> annotationClass)`
    `default <T extends Annotation> T[]` | AnnotatedElement.`getAnnotationsByType(Class<T> annotationClass)` Returns annotations that are associated with this element.
    `default <T extends Annotation> T` | AnnotatedElement.`getDeclaredAnnotation(Class<T> annotationClass)` Returns this element's annotation for the specified type if such an annotation is directly present, else null.
    `default <T extends Annotation> T[]` | AnnotatedElement.`getDeclaredAnnotationsByType(Class<T> annotationClass)` Returns this element's annotation(s) for the specified type if such annotations are either directly present or indirectly present.
    `static Class<?>` | Proxy.`getProxyClass(ClassLoader loader, Class<?>... interfaces)` Returns the `java.lang.Class` object for a proxy class given a class loader and an array of interfaces.
    `default boolean` | AnnotatedElement.`isAnnotationPresent(Class<? extends Annotation> annotationClass)` Returns true if an annotation for the specified type is present on this element, else false.
    `boolean` | AccessibleObject.`isAnnotationPresent(Class<? extends Annotation> annotationClass)`
    `static boolean` | Proxy.`isProxyClass(Class<?> cl)` Returns true if and only if the specified class was dynamically generated to be a proxy class using the `getProxyClass` method or the `newProxyInstance` method.
    `static Object` | Array.`newInstance(Class<?> componentType, int... dimensions)` Creates a new array with the specified component type and dimensions.
    `static Object` | Array.`newInstance(Class<?> componentType, int length)` Creates a new array with the specified component type and length.
    `static Object` | Proxy.`newProxyInstance(ClassLoader loader, Class<?>[] interfaces, InvocationHandler h)` Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.

  - ### Uses of Class in java.net

    Methods in java.net with parameters of type Class
    Modifier and Type | Method and Description
    --- | ---
    `Object` | URL.`getContent(Class[] classes)` Gets the contents of this URL.

  - ### Uses of Class in java.util

    Methods in java.util with parameters of type Class
    Modifier and Type | Method and Description
    --- | ---
    `static <S> ServiceLoader<S>` | ServiceLoader.`load(Class<S> service)` Creates a new service loader for the given service type, using the current thread's context class loader.
    `static <S> ServiceLoader<S>` | ServiceLoader.`load(Class<S> service, ClassLoader loader)` Creates a new service loader for the given service type and class loader.
    `static <S> ServiceLoader<S>` | ServiceLoader.`loadInstalled(Class<S> service)` Creates a new service loader for the given service type, using the extension class loader.

  - ### Uses of Class in org.apidesign.vm4brwsr.api

    Methods in org.apidesign.vm4brwsr.api with parameters of type Class
    Modifier and Type | Method and Description
    --- | ---
    `static void` | VM.`reload(Class<?> clazz, byte[] byteCode)` Takes an existing class and replaces its existing byte code with new one.

Copyright © 2025 API Design. All Rights Reserved.