Uses of Class
java.lang.Class
Package
Description
Provides a collection of interfaces and classes that compose the Java Accessibility
Utilities.
Provides interfaces to represent source code as abstract syntax
trees (AST).
Contains all of the classes for creating user interfaces and for painting
graphics and images.
Provides interfaces and classes for transferring data between and within
applications.
Drag and Drop is a direct manipulation gesture found in many Graphical User
Interface systems that provides a mechanism to transfer information between
two entities logically associated with presentation elements in the GUI.
Provides classes and interfaces for producing rendering-independent images.
Contains classes related to developing beans -- components based on
the JavaBeans architecture.
Provides classes and interfaces relating to bean context.
Provides for system input and output through data streams,
serialization and the file system.
Provides classes that are fundamental to the design of the Java
programming language.
Provides library support for the Java programming language
annotation facility.
Provides low-level access to memory and functions outside the Java runtime.
Provides services that allow Java programming language agents to instrument
programs running on the JVM.
The
java.lang.invoke
package provides low-level primitives for interacting
with the Java Virtual Machine.Provides the management interfaces for monitoring and management of the
Java virtual machine and other components in the Java runtime.
Provides classes and interfaces for obtaining reflective information about
classes and objects.
The
java.lang.runtime
package provides low-level runtime support
for the Java language.Provides the classes for implementing networking applications.
Defines interfaces and classes for the Java virtual machine to access files,
file attributes, and file systems.
Service-provider classes for the
java.nio.file
package.Provides classes and interfaces for supporting the server side of RMI.
Provides the classes and interfaces for the security framework.
Provides the API for accessing and processing data stored in a
data source (usually a relational database) using the
Java programming language.
Contains the collections framework, some internationalization support classes,
a service loader, properties, random number generation, string parsing
and scanning classes, base64 encoding and decoding, a bit array, and
several miscellaneous utility classes.
A small toolkit of classes that support lock-free thread-safe
programming on single variables.
This package allows applications to store and retrieve user and system
preference and configuration data.
Facilities for declaring annotation processors and for
allowing annotation processors to communicate with an annotation processing
tool environment.
Provides the classes and interfaces for cryptographic
operations.
A package of the Java Image I/O API dealing with reading and writing
metadata.
A package of the Java Image I/O API containing the plug-in interfaces for
readers, writers, transcoders, and streams, and a runtime registry.
Types and hierarchies of packages comprising a Java language model, a model of the declarations and types of the Java
programming language.
Interfaces used to model elements of the Java programming language.
Interfaces used to model Java programming language types.
Provides the core classes for the Java Management Extensions.
Provides the classes which implement advanced dynamic
loading.
Provides the open data types and Open MBean descriptor classes.
Provides the means for dynamically plugging in support for accessing
naming and directory services through the
javax.naming
and related packages.Provides the principal classes and interfaces for the Java Print
Service API.
Provides classes and interfaces that describe the types of Java Print
Service attributes and how they can be collected into attribute sets.
Package
javax.print.attribute.standard
contains classes for specific
printing attributes.The scripting API consists of interfaces and classes that define
Java Scripting Engines and provides
a framework for their use in Java applications.
This package provides a framework for authentication and
authorization.
Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI
(Musical Instrument Digital Interface) data.
Provides interfaces and classes for capture, processing, and playback of
sampled audio data.
Provides the API for server side data source access and processing from
the Java programming language.
Standard interfaces and base classes for JDBC
RowSet
implementations.Provides utility classes to allow serializable mappings between SQL types
and data types in the Java programming language.
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Provides for events fired by Swing components.
Synth is a skinnable look and feel in which all painting is delegated.
Provides classes and interfaces for dealing with
javax.swing.JTable
.Provides classes and interfaces that deal with editable and noneditable text
components.
Provides classes and interfaces for dealing with
javax.swing.JTree
.Provides interfaces for tools which can be invoked from a program,
for example, compilers.
Provides an object-model neutral API for the
evaluation of XPath expressions and access to the evaluation
environment.
Contains the linker for ordinary Java objects.
Contains interfaces and classes needed by language runtimes to implement
their own language-specific object models and type conversions.
Contains classes that make it more convenient for language runtimes to
implement their own language-specific object models and type conversions
by providing basic implementations of some classes as well as various
utilities.
Incubating Feature. Will be removed in a future release.
This package provides classes to create events and control Flight Recorder.
This package contains classes for consuming Flight Recorder data.
Provides implementation support for building JShell execution engines.
Platform specific socket options for the
java.net
and java.nio.channels
socket classes.-
Uses of Class in com.sun.java.accessibility.util
Modifier and TypeMethodDescriptionprotected static Class<?>
Translator.getTranslatorClass
(Class<?> c) Find a translator for this class.Modifier and TypeMethodDescriptionvoid
AccessibilityListenerList.add
(Class<? extends EventListener> t, EventListener l) Add the listener as a listener of the specified type.int
AccessibilityListenerList.getListenerCount
(Class<? extends EventListener> t) Return the total number of listeners of the supplied type for this listener list.protected static Class<?>
Translator.getTranslatorClass
(Class<?> c) Find a translator for this class.void
AccessibilityListenerList.remove
(Class<? extends EventListener> t, EventListener l) Remove the listener as a listener of the specified type. -
Uses of Class in com.sun.source.tree
Modifier and TypeMethodDescriptionTree.Kind.asInterface()
Returns the associated interface type that uses this kind. -
Uses of Class in java.awt
Modifier and TypeMethodDescription<T extends DragGestureRecognizer>
TToolkit.createDragGestureRecognizer
(Class<T> abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl) Creates a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associates it with the DragSource, Component and DragGestureListener specified.static <T extends EventListener>
T[]AWTEventMulticaster.getListeners
(EventListener l, Class<T> listenerType) Returns an array of all the objects chained asFooListener
s by the specifiedjava.util.EventListener
.<T extends EventListener>
T[]Button.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisButton
.<T extends EventListener>
T[]Checkbox.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisCheckbox
.<T extends EventListener>
T[]CheckboxMenuItem.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisCheckboxMenuItem
.<T extends EventListener>
T[]Choice.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisChoice
.<T extends EventListener>
T[]Component.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisComponent
.<T extends EventListener>
T[]Container.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisContainer
.<T extends EventListener>
T[]List.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisList
.<T extends EventListener>
T[]MenuItem.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisMenuItem
.<T extends EventListener>
T[]Scrollbar.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisScrollbar
.<T extends EventListener>
T[]TextComponent.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisTextComponent
.<T extends EventListener>
T[]TextField.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisTextField
.<T extends EventListener>
T[]Window.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisWindow
.protected static void
AWTKeyStroke.registerSubclass
(Class<?> subclass) Deprecated. -
Uses of Class in java.awt.datatransfer
Modifier and TypeMethodDescriptionfinal Class<?>
DataFlavor.getDefaultRepresentationClass()
Returns the default representation class.Class<?>
DataFlavor.getRepresentationClass()
Returns theClass
which objects supporting thisDataFlavor
will return when thisDataFlavor
is requested.protected static final Class<?>
DataFlavor.tryToLoadClass
(String className, ClassLoader fallback) Tries to load a class from: the bootstrap loader, the system loader, the context loader (if one is present) and finally the loader specified.ModifierConstructorDescriptionDataFlavor
(Class<?> representationClass, String humanPresentableName) Constructs aDataFlavor
that represents a Java class. -
Uses of Class in java.awt.dnd
Modifier and TypeMethodDescription<T extends DragGestureRecognizer>
TDragSource.createDragGestureRecognizer
(Class<T> recognizerAbstractClass, Component c, int actions, DragGestureListener dgl) Creates a newDragGestureRecognizer
that implements the specified abstract subclass ofDragGestureRecognizer
, and sets the specifiedComponent
andDragGestureListener
on the newly created object.<T extends EventListener>
T[]DragSource.getListeners
(Class<T> listenerType) Gets all the objects currently registered asFooListener
s upon thisDragSource
. -
Uses of Class in java.awt.image.renderable
Modifier and TypeMethodDescriptionClass<?>[]
ParameterBlock.getParamClasses()
Returns an array of Class objects describing the types of the parameters. -
Uses of Class in java.beans
Modifier and TypeMethodDescriptionClass<?>
BeanDescriptor.getBeanClass()
Gets the bean's Class object.Class<?>
BeanDescriptor.getCustomizerClass()
Gets the Class object for the bean's customizer.Class<?>
IndexedPropertyDescriptor.getIndexedPropertyType()
Returns the Java type info for the indexed property.Class<?>
EventSetDescriptor.getListenerType()
Gets theClass
object for the target interface.Class<?>
PropertyDescriptor.getPropertyEditorClass()
Gets any explicit PropertyEditor Class that has been registered for this property.Class<?>
PropertyDescriptor.getPropertyType()
Returns the Java type info for the property.Modifier and TypeMethodDescriptionstatic <T> T
Creates an implementation oflistenerInterface
in which all of the methods in the listener interface apply the handler'saction
to thetarget
.static <T> T
EventHandler.create
(Class<T> listenerInterface, Object target, String action, String eventPropertyName) /** Creates an implementation oflistenerInterface
in which all of the methods pass the value of the event expression,eventPropertyName
, to the final method in the statement,action
, which is applied to thetarget
.static <T> T
EventHandler.create
(Class<T> listenerInterface, Object target, String action, String eventPropertyName, String listenerMethodName) Creates an implementation oflistenerInterface
in which the method namedlistenerMethodName
passes the value of the event expression,eventPropertyName
, to the final method in the statement,action
, which is applied to thetarget
.static PropertyEditor
PropertyEditorManager.findEditor
(Class<?> targetType) Locate a value editor for a given target type.static void
Introspector.flushFromCaches
(Class<?> clz) Flush the Introspector's internal cached information for a given class.static BeanInfo
Introspector.getBeanInfo
(Class<?> beanClass) Introspect on a Java Bean and learn about all its properties, exposed methods, and events.static BeanInfo
Introspector.getBeanInfo
(Class<?> beanClass, int flags) Introspect on a Java bean and learn about all its properties, exposed methods, and events, subject to some control flags.static BeanInfo
Introspector.getBeanInfo
(Class<?> beanClass, Class<?> stopClass) Introspect on a Java bean and learn all about its properties, exposed methods, below a given "stop" point.static BeanInfo
Introspector.getBeanInfo
(Class<?> beanClass, Class<?> stopClass, int flags) Introspect on a Java Bean and learn about all its properties, exposed methods and events, below a givenstopClass
point subject to some controlflags
.static Object
Beans.getInstanceOf
(Object bean, Class<?> targetType) From a given bean, obtain an object representing a specified type view of that source object.Encoder.getPersistenceDelegate
(Class<?> type) Returns the persistence delegate for the given type.protected void
DefaultPersistenceDelegate.initialize
(Class<?> type, Object oldInstance, Object newInstance, Encoder out) This default implementation of theinitialize
method assumes all state held in objects of this type is exposed via the matching pairs of "setter" and "getter" methods in the order they are returned by the Introspector.protected void
PersistenceDelegate.initialize
(Class<?> type, Object oldInstance, Object newInstance, Encoder out) Produce a series of statements with side effects onnewInstance
so that the new instance becomes equivalent tooldInstance
.static boolean
Beans.isInstanceOf
(Object bean, Class<?> targetType) Check if a bean can be viewed as a given target type.static void
PropertyEditorManager.registerEditor
(Class<?> targetType, Class<?> editorClass) Registers an editor class to edit values of the given target class.void
Encoder.setPersistenceDelegate
(Class<?> type, PersistenceDelegate delegate) Associates the specified persistence delegate with the given type.void
PropertyDescriptor.setPropertyEditorClass
(Class<?> propertyEditorClass) Normally PropertyEditors will be found using the PropertyEditorManager.ModifierConstructorDescriptionBeanDescriptor
(Class<?> beanClass) Create a BeanDescriptor for a bean that doesn't have a customizer.BeanDescriptor
(Class<?> beanClass, Class<?> customizerClass) Create a BeanDescriptor for a bean that has a customizer.EventSetDescriptor
(Class<?> sourceClass, String eventSetName, Class<?> listenerType, String listenerMethodName) Creates anEventSetDescriptor
assuming that you are following the most simple standard design pattern where a named event "fred" is (1) delivered as a call on the single method of interface FredListener, (2) has a single argument of type FredEvent, and (3) where the FredListener may be registered with a call on an addFredListener method of the source component and removed with a call on a removeFredListener method.EventSetDescriptor
(Class<?> sourceClass, String eventSetName, Class<?> listenerType, String[] listenerMethodNames, String addListenerMethodName, String removeListenerMethodName) Creates anEventSetDescriptor
from scratch using string names.EventSetDescriptor
(Class<?> sourceClass, String eventSetName, Class<?> listenerType, String[] listenerMethodNames, String addListenerMethodName, String removeListenerMethodName, String getListenerMethodName) This constructor creates an EventSetDescriptor from scratch using string names.EventSetDescriptor
(String eventSetName, Class<?> listenerType, MethodDescriptor[] listenerMethodDescriptors, Method addListenerMethod, Method removeListenerMethod) Creates anEventSetDescriptor
from scratch usingjava.lang.reflect.MethodDescriptor
andjava.lang.Class
objects.EventSetDescriptor
(String eventSetName, Class<?> listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod) Creates anEventSetDescriptor
from scratch usingjava.lang.reflect.Method
andjava.lang.Class
objects.EventSetDescriptor
(String eventSetName, Class<?> listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod, Method getListenerMethod) This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.Method and java.lang.Class objects.IndexedPropertyDescriptor
(String propertyName, Class<?> beanClass) This constructor constructs an IndexedPropertyDescriptor for a property that follows the standard Java conventions by having getFoo and setFoo accessor methods, for both indexed access and array access.IndexedPropertyDescriptor
(String propertyName, Class<?> beanClass, String readMethodName, String writeMethodName, String indexedReadMethodName, String indexedWriteMethodName) This constructor takes the name of a simple property, and method names for reading and writing the property, both indexed and non-indexed.PropertyDescriptor
(String propertyName, Class<?> beanClass) Constructs a PropertyDescriptor for a property that follows the standard Java convention by having getFoo and setFoo accessor methods.PropertyDescriptor
(String propertyName, Class<?> beanClass, String readMethodName, String writeMethodName) This constructor takes the name of a simple property, and method names for reading and writing the property. -
Uses of Class in java.beans.beancontext
Modifier and TypeFieldDescriptionprotected Class<?>
BeanContextServiceAvailableEvent.serviceClass
AClass
reference to the newly available serviceprotected Class<?>
BeanContextServiceRevokedEvent.serviceClass
AClass
reference to the service that is being revoked.Modifier and TypeMethodDescriptionClass<?>
BeanContextServiceAvailableEvent.getServiceClass()
Gets the service class that is the subject of this notification.Class<?>
BeanContextServiceRevokedEvent.getServiceClass()
Gets the service class that is the subject of this notificationModifier and TypeMethodDescriptionboolean
BeanContextServices.addService
(Class<?> serviceClass, BeanContextServiceProvider serviceProvider) Adds a service to this BeanContext.boolean
BeanContextServicesSupport.addService
(Class<?> serviceClass, BeanContextServiceProvider bcsp) add a serviceprotected boolean
BeanContextServicesSupport.addService
(Class<?> serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent) add a serviceprotected static final boolean
BeanContextSupport.classEquals
(Class<?> first, Class<?> second) Tests to see if two class objects, or their names are equal.BeanContextServicesSupport.createBCSSServiceProvider
(Class<?> sc, BeanContextServiceProvider bcsp) subclasses can override this method to create new subclasses of BCSSServiceProvider without having to override addService() in order to instantiate.protected final void
BeanContextServicesSupport.fireServiceAdded
(Class<?> serviceClass) Fires aBeanContextServiceEvent
notifying of a new service.protected final void
BeanContextServicesSupport.fireServiceRevoked
(Class<?> serviceClass, boolean revokeNow) Fires aBeanContextServiceRevokedEvent
indicating that a particular service is no longer available.Iterator<?>
BeanContextServiceProvider.getCurrentServiceSelectors
(BeanContextServices bcs, Class<?> serviceClass) Invoked byBeanContextServices
, this method gets the current service selectors for the specified service.Iterator<?>
BeanContextServices.getCurrentServiceSelectors
(Class<?> serviceClass) Gets the list of service dependent service parameters (Service Selectors) for the specified service, by calling getCurrentServiceSelectors() on the underlying BeanContextServiceProvider.Iterator<?>
BeanContextServicesSupport.BCSSProxyServiceProvider.getCurrentServiceSelectors
(BeanContextServices bcs, Class<?> serviceClass) Iterator<?>
BeanContextServicesSupport.getCurrentServiceSelectors
(Class<?> serviceClass) BeanContextServiceProvider.getService
(BeanContextServices bcs, Object requestor, Class<?> serviceClass, Object serviceSelector) Invoked byBeanContextServices
, this method requests an instance of a service from thisBeanContextServiceProvider
.BeanContextServices.getService
(BeanContextChild child, Object requestor, Class<?> serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) ABeanContextChild
, or any arbitrary object associated with aBeanContextChild
, may obtain a reference to a currently registered service from its nestingBeanContextServices
via invocation of this method.BeanContextServicesSupport.BCSSProxyServiceProvider.getService
(BeanContextServices bcs, Object requestor, Class<?> serviceClass, Object serviceSelector) BeanContextServicesSupport.getService
(BeanContextChild child, Object requestor, Class<?> serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) obtain a service which may be delegatedboolean
BeanContextServices.hasService
(Class<?> serviceClass) Reports whether or not a given service is currently available from this context.boolean
BeanContextServicesSupport.hasService
(Class<?> serviceClass) has a service, which may be delegatedboolean
BeanContextServiceRevokedEvent.isServiceClass
(Class<?> service) Checks this event to determine whether or not the service being revoked is of a particular class.void
BeanContextServices.revokeService
(Class<?> serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow) BeanContextServiceProviders wishing to remove a currently registered service from this context may do so via invocation of this method.void
BeanContextServicesSupport.revokeService
(Class<?> serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow) remove a serviceModifierConstructorDescriptionBeanContextServiceAvailableEvent
(BeanContextServices bcs, Class<?> sc) Construct aBeanContextAvailableServiceEvent
.BeanContextServiceRevokedEvent
(BeanContextServices bcs, Class<?> sc, boolean invalidate) Construct aBeanContextServiceEvent
. -
Uses of Class in java.io
Modifier and TypeMethodDescriptionClass<?>
ObjectStreamClass.forClass()
Return the class in the local VM that this version is mapped to.Class<?>
ObjectStreamField.getType()
Get the type of the field.protected Class<?>
ObjectInputStream.resolveClass
(ObjectStreamClass desc) Load the local class equivalent of the specified stream class description.protected Class<?>
ObjectInputStream.resolveProxyClass
(String[] interfaces) Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy classes, allowing them to use an alternate loading mechanism for the interfaces and the proxy class.Class<?>
ObjectInputFilter.FilterInfo.serialClass()
The class of an object being deserialized.Modifier and TypeMethodDescriptionprotected void
ObjectOutputStream.annotateClass
(Class<?> cl) Subclasses may implement this method to allow class data to be stored in the stream.protected void
ObjectOutputStream.annotateProxyClass
(Class<?> cl) Subclasses may implement this method to store custom data in the stream along with descriptors for dynamic proxy classes.static ObjectStreamClass
Find the descriptor for a class that can be serialized.static ObjectStreamClass
Returns the descriptor for any class, regardless of whether it implementsSerializable
.Modifier and TypeMethodDescriptionstatic ObjectInputFilter
ObjectInputFilter.allowFilter
(Predicate<Class<?>> predicate, ObjectInputFilter.Status otherStatus) Returns a filter that returnsStatus.ALLOWED
if the predicate on the class istrue
.static ObjectInputFilter
ObjectInputFilter.rejectFilter
(Predicate<Class<?>> predicate, ObjectInputFilter.Status otherStatus) Returns a filter that returnsStatus.REJECTED
if the predicate on the class istrue
.ModifierConstructorDescriptionObjectStreamField
(String name, Class<?> type) Create a Serializable field with the specified type.ObjectStreamField
(String name, Class<?> type, boolean unshared) Creates an ObjectStreamField representing a serializable field with the given name and type. -
Uses of Class in java.lang
Modifier and TypeFieldDescriptionBoolean.TYPE
The Class object representing the primitive type boolean.Byte.TYPE
TheClass
instance representing the primitive typebyte
.Character.TYPE
TheClass
instance representing the primitive typechar
.Double.TYPE
TheClass
instance representing the primitive typedouble
.Float.TYPE
TheClass
instance representing the primitive typefloat
.Integer.TYPE
TheClass
instance representing the primitive typeint
.Long.TYPE
TheClass
instance representing the primitive typelong
.Short.TYPE
TheClass
instance representing the primitive typeshort
.Void.TYPE
TheClass
object representing the pseudo-type corresponding to the keywordvoid
.Modifier and TypeMethodDescriptionClass<?>
Class.arrayType()
Returns aClass
for an array type whose component type is described by this Class.<U> Class<? extends U>
Class.asSubclass
(Class<U> clazz) Casts thisClass
object to represent a subclass of the class represented by the specified class object.Class<?>
Class.componentType()
Returns the component type of thisClass
, if it describes an array type, ornull
otherwise.protected final Class<?>
ClassLoader.defineClass
(byte[] b, int off, int len) Deprecated.protected final Class<?>
ClassLoader.defineClass
(String name, byte[] b, int off, int len) Converts an array of bytes into an instance of classClass
.protected final Class<?>
ClassLoader.defineClass
(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain) Converts an array of bytes into an instance of classClass
, with a givenProtectionDomain
.protected final Class<?>
ClassLoader.defineClass
(String name, ByteBuffer b, ProtectionDomain protectionDomain) EnumConstantNotPresentException.enumType()
Returns the type of the missing enum constant.protected Class<?>
Finds the class with the specified binary name.protected Class<?>
Finds the class with the given binary name in a module defined to this class loader.protected final 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 final Class<?>
ClassLoader.findSystemClass
(String name) Finds a class with the specified binary name, loading it if necessary.static Class<?>
Returns theClass
with the given binary name in the given module.static Class<?>
Returns theClass
object associated with the class or interface with the given string name.static Class<?>
Class.forName
(String name, boolean initialize, ClassLoader loader) Returns theClass
object associated with the class or interface with the given string name, using the given class loader.Class<?>
StackWalker.getCallerClass()
Gets theClass
object of the caller who invoked the method that invokedgetCallerClass
.final Class<?>
Object.getClass()
Returns the runtime class of thisObject
.protected Class<?>[]
SecurityManager.getClassContext()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the current execution stack as an array of classes.Class<?>[]
Class.getClasses()
Returns an array containingClass
objects representing all the public classes and interfaces that are members of the class represented by thisClass
object.Class<?>
Class.getComponentType()
Returns theClass
representing the component type of an array.Class<?>[]
Class.getDeclaredClasses()
Returns an array ofClass
objects reflecting all the classes and interfaces declared as members of the class represented by thisClass
object.Class<?>
Class.getDeclaringClass()
If the class or interface represented by thisClass
object is a member of another class, returns theClass
object representing the class in which it was declared.Enum.getDeclaringClass()
Returns the Class object corresponding to this enum constant's enum type.Class<?>
StackWalker.StackFrame.getDeclaringClass()
Gets the declaringClass
for the method represented by this stack frame.Class<?>
Class.getEnclosingClass()
Returns the immediately enclosing class of the underlying class.Class<?>[]
Class.getInterfaces()
Returns the interfaces directly implemented by the class or interface represented by thisClass
object.Class<?>
Class.getNestHost()
Returns the nest host of the nest to which the class or interface represented by thisClass
object belongs.Class<?>[]
Class.getNestMembers()
Returns an array containingClass
objects representing all the classes and interfaces that are members of the nest to which the class or interface represented by thisClass
object belongs.Class<?>[]
Class.getPermittedSubclasses()
Returns an array containingClass
objects representing the direct subinterfaces or subclasses permitted to extend or implement this class or interface if it is sealed.Class.getSuperclass()
Returns theClass
representing the direct superclass of the entity (class, interface, primitive type or void) represented by thisClass
.Class<?>
Loads the class with the specified binary name.protected Class<?>
Loads the class with the specified binary name.Modifier and TypeMethodDescriptionTypeVariable<Class<T>>[]
Class.getTypeParameters()
Returns an array ofTypeVariable
objects that represent the type variables declared by the generic declaration represented by thisGenericDeclaration
object, in declaration order.Modifier and TypeMethodDescriptionIf the caller's module is this module then update this module to add a service dependence on the given service type.<U> Class<? extends U>
Class.asSubclass
(Class<U> clazz) Casts thisClass
object to represent a subclass of the class represented by the specified class object.boolean
Indicates if this module has a service dependence on the given service type.static boolean
Compiler.compileClass
(Class<?> clazz) Deprecated, for removal: This API element is subject to removal in a future version.Compiles the specified class.protected abstract T
ClassValue.computeValue
(Class<?> type) Computes the given class's derived value for thisClassValue
.Returns the value for the given class.<A extends Annotation>
AClass.getAnnotation
(Class<A> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TModule.getAnnotation
(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.<A extends Annotation>
APackage.getAnnotation
(Class<A> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.<A extends Annotation>
A[]Class.getAnnotationsByType
(Class<A> annotationClass) Returns annotations that are associated with this element.<A extends Annotation>
A[]Package.getAnnotationsByType
(Class<A> annotationClass) Returns annotations that are associated with this element.Class.getConstructor
(Class<?>... parameterTypes) Returns aConstructor
object that reflects the specified public constructor of the class represented by thisClass
object.<A extends Annotation>
AClass.getDeclaredAnnotation
(Class<A> annotationClass) Returns this element's annotation for the specified type if such an annotation is directly present, else null.<A extends Annotation>
APackage.getDeclaredAnnotation
(Class<A> annotationClass) Returns this element's annotation for the specified type if such an annotation is directly present, else null.<A extends Annotation>
A[]Class.getDeclaredAnnotationsByType
(Class<A> annotationClass) Returns this element's annotation(s) for the specified type if such annotations are either directly present or indirectly present.<A extends Annotation>
A[]Package.getDeclaredAnnotationsByType
(Class<A> annotationClass) Class.getDeclaredConstructor
(Class<?>... parameterTypes) Returns aConstructor
object that reflects the specified constructor of the class represented by thisClass
object.Class.getDeclaredMethod
(String name, Class<?>... parameterTypes) Returns aMethod
object that reflects the specified declared method of the class or interface represented by thisClass
object.Returns aMethod
object that reflects the specified public member method of the class or interface represented by thisClass
object.boolean
Class.isAnnotationPresent
(Class<? extends Annotation> annotationClass) Returns true if an annotation for the specified type is present on this element, else false.boolean
Package.isAnnotationPresent
(Class<? extends Annotation> annotationClass) Returns true if an annotation for the specified type is present on this element, else false.boolean
Class.isAssignableFrom
(Class<?> cls) Determines if the class or interface represented by thisClass
object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specifiedClass
parameter.boolean
Class.isNestmateOf
(Class<?> c) Determines if the givenClass
is a nestmate of the class or interface represented by thisClass
object.void
Removes the associated value for the given class.protected final void
ClassLoader.resolveClass
(Class<?> c) Links the specified class.protected final void
ClassLoader.setSigners
(Class<?> c, Object[] signers) Sets the signers of a class.static <T extends Enum<T>>
TReturns the enum constant of the specified enum class with the specified name.ModifierConstructorDescriptionEnumConstantNotPresentException
(Class<? extends Enum> enumType, String constantName) Constructs anEnumConstantNotPresentException
for the specified constant. -
Uses of Class in java.lang.annotation
Modifier and TypeMethodDescriptionClass<? extends Annotation>
Annotation.annotationType()
Returns the annotation interface of this annotation.Class<? extends Annotation>
IncompleteAnnotationException.annotationType()
Returns the Class object for the annotation interface with the missing element.ModifierConstructorDescriptionIncompleteAnnotationException
(Class<? extends Annotation> annotationType, String elementName) Constructs an IncompleteAnnotationException to indicate that the named element was missing from the specified annotation interface. -
Uses of Class in java.lang.foreign
Modifier and TypeMethodDescriptionClass<?>
ValueLayout.carrier()
Returns the carrier associated with this value layout.Modifier and TypeMethodDescriptionstatic ValueLayoutPREVIEW
MemoryLayout.valueLayout
(Class<?> carrier, ByteOrder order) Creates a value layout of given Java carrier and byte order. -
Uses of Class in java.lang.instrument
Modifier and TypeMethodDescriptionClass[]
Instrumentation.getAllLoadedClasses()
Returns an array of all classes currently loaded by the JVM.Class<?>
ClassDefinition.getDefinitionClass()
Returns the class.Class[]
Instrumentation.getInitiatedClasses
(ClassLoader loader) Returns an array of all classes whichloader
can find by name viaClassLoader::loadClass
,Class::forName
and bytecode linkage.Modifier and TypeMethodDescriptionboolean
Instrumentation.isModifiableClass
(Class<?> theClass) Tests whether a class is modifiable by retransformation or redefinition.void
Instrumentation.retransformClasses
(Class<?>... classes) Retransform the supplied set of classes.default byte[]
ClassFileTransformer.transform
(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) Transforms the given class file and returns a new replacement class file.default byte[]
ClassFileTransformer.transform
(Module module, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) Transforms the given class file and returns a new replacement class file.ModifierConstructorDescriptionClassDefinition
(Class<?> theClass, byte[] theClassFile) Creates a newClassDefinition
binding using the supplied class and class file bytes. -
Uses of Class in java.lang.invoke
Modifier and TypeMethodDescriptionClass<?>
MethodHandles.Lookup.accessClass
(Class<?> targetClass) Determines if a class can be accessed from the lookup context defined by thisLookup
object.Class<?>
MethodHandles.Lookup.defineClass
(byte[] bytes) Creates and links a class or interface frombytes
with the same class loader and in the same runtime package and protection domain as this lookup's lookup class as if callingClassLoader::defineClass
.Class<?>
MethodHandles.Lookup.ensureInitialized
(Class<?> targetClass) Ensures thattargetClass
has been initialized.Class<?>
Looks up a class by name from the lookup context defined by thisLookup
object, as if resolved by anldc
instruction.Class<?>
MethodHandleInfo.getDeclaringClass()
Returns the class in which the cracked method handle's underlying member was defined.Class<?>
MethodType.lastParameterType()
Returns the last parameter type of this method type.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<?>
MethodHandles.Lookup.previousLookupClass()
Reports a lookup class in another module that this lookup object was previously teleported from, ornull
.static Class<?>
ConstantBootstraps.primitiveClass
(MethodHandles.Lookup lookup, String name, Class<?> type) Returns aClass
mirror for the primitive type whose type descriptor is specified byname
.Class<?>
MethodType.returnType()
Returns the return type of this method type.Class<?>
VarHandle.varType()
Returns the variable type of variables referenced by this VarHandle.static Class<?>
MethodHandleProxies.wrapperInstanceType
(Object x) Recovers the unique single-method interface type for which this wrapper instance was created.Modifier and TypeMethodDescriptionVarHandle.coordinateTypes()
Returns the coordinate types for this VarHandle.MethodType.parameterList()
Presents the parameter types as a list (a convenience method).Modifier and TypeMethodDescriptionClass<?>
MethodHandles.Lookup.accessClass
(Class<?> targetClass) Determines if a class can be accessed from the lookup context defined by thisLookup
object.MethodType.appendParameterTypes
(Class<?>... ptypesToInsert) Finds or creates a method type with additional parameter types.static MethodHandle
MethodHandles.arrayConstructor
(Class<?> arrayClass) Produces a method handle constructing arrays of a desired type, as if by theanewarray
bytecode.static MethodHandle
MethodHandles.arrayElementGetter
(Class<?> arrayClass) Produces a method handle giving read access to elements of an array, as if by theaaload
bytecode.static MethodHandle
MethodHandles.arrayElementSetter
(Class<?> arrayClass) Produces a method handle giving write access to elements of an array, as if by theastore
bytecode.static VarHandle
MethodHandles.arrayElementVarHandle
(Class<?> arrayClass) Produces a VarHandle giving access to elements of an array of typearrayClass
.static MethodHandle
MethodHandles.arrayLength
(Class<?> arrayClass) Produces a method handle returning the length of an array, as if by thearraylength
bytecode.static VarHandle
ConstantBootstraps.arrayVarHandle
(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> arrayClass) Finds aVarHandle
for an array type.MethodHandle.asCollector
(int collectArgPos, Class<?> arrayType, int arrayLength) Makes an array-collecting method handle, which accepts a given number of positional arguments starting at a given position, and collects them into an array argument.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.static <T> T
MethodHandleProxies.asInterfaceInstance
(Class<T> intfc, MethodHandle target) Produces an instance of the given single-method interface which redirects its calls to the given method handle.MethodHandle.asSpreader
(int spreadArgPos, Class<?> arrayType, int arrayLength) Makes an array-spreading method handle, which accepts an array argument at a given position and spreads its elements as positional arguments in place of the array.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.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.static VarHandle
MethodHandles.byteArrayViewVarHandle
(Class<?> viewArrayClass, ByteOrder byteOrder) Produces a VarHandle giving access to elements of abyte[]
array viewed as if it were a different primitive array type, such asint[]
orlong[]
.static VarHandle
MethodHandles.byteBufferViewVarHandle
(Class<?> viewArrayClass, ByteOrder byteOrder) Produces a VarHandle giving access to elements of aByteBuffer
viewed as if it were an array of elements of a different primitive component type to that ofbyte
, such asint[]
orlong[]
.static MethodHandle
MethodHandles.catchException
(MethodHandle target, Class<? extends Throwable> exType, MethodHandle handler) Makes a method handle which adapts a target method handle, by running it inside an exception handler.MethodType.changeParameterType
(int num, Class<?> nptype) Finds or creates a method type with a single different parameter type.MethodType.changeReturnType
(Class<?> nrtype) Finds or creates a method type with a different return type.static <T> T
MethodHandles.classData
(MethodHandles.Lookup caller, String name, Class<T> type) Returns the class data associated with the lookup class of the givencaller
lookup object, ornull
.static <T> T
MethodHandles.classDataAt
(MethodHandles.Lookup caller, String name, Class<T> type, int index) Returns the element at the specified index in the class data, if the class data associated with the lookup class of the givencaller
lookup object is aList
.static MethodHandle
Produces a method handle of the requested return type which returns the given constant value every time it is invoked.static MethodHandle
MethodHandles.dropArguments
(MethodHandle target, int pos, Class<?>... valueTypes) Produces a method handle which will discard some dummy arguments before calling some other specified target method handle.static VarHandle
MethodHandles.dropCoordinates
(VarHandle target, int pos, Class<?>... valueTypes) Preview.Returns a var handle which will discard some dummy coordinates before delegating to the target var handle.Class<?>
MethodHandles.Lookup.ensureInitialized
(Class<?> targetClass) Ensures thattargetClass
has been initialized.static <E extends Enum<E>>
EConstantBootstraps.enumConstant
(MethodHandles.Lookup lookup, String name, Class<E> type) Returns anenum
constant of the type specified bytype
with the name specified byname
.static Object
ConstantBootstraps.explicitCast
(MethodHandles.Lookup lookup, String name, Class<?> dstType, Object value) Applies a conversion from a source type to a destination type.static VarHandle
ConstantBootstraps.fieldVarHandle
(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType) Finds aVarHandle
for an instance field.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.MethodHandles.Lookup.findGetter
(Class<?> refc, String name, Class<?> type) Produces a method handle giving read access to a non-static field.MethodHandles.Lookup.findSetter
(Class<?> refc, String name, Class<?> type) Produces a method handle giving write access to a non-static field.MethodHandles.Lookup.findSpecial
(Class<?> refc, String name, MethodType type, Class<?> specialCaller) Produces an early-bound method handle for a virtual method.MethodHandles.Lookup.findStatic
(Class<?> refc, String name, MethodType type) Produces a method handle for a static method.MethodHandles.Lookup.findStaticGetter
(Class<?> refc, String name, Class<?> type) Produces a method handle giving read access to a static field.MethodHandles.Lookup.findStaticSetter
(Class<?> refc, String name, Class<?> type) Produces a method handle giving write access to a static field.MethodHandles.Lookup.findStaticVarHandle
(Class<?> decl, String name, Class<?> type) Produces a VarHandle giving access to a static fieldname
of typetype
declared in a class of typedecl
.MethodHandles.Lookup.findVarHandle
(Class<?> recv, String name, Class<?> type) Produces a VarHandle giving access to a non-static fieldname
of typetype
declared in a class of typerecv
.MethodHandles.Lookup.findVirtual
(Class<?> refc, String name, MethodType type) Produces a method handle for a virtual method.static Object
ConstantBootstraps.getStaticFinal
(MethodHandles.Lookup lookup, String name, Class<?> type) Returns the value of a static final field declared in the class which is the same as the field's type (or, for primitive-valued fields, declared in the wrapper class.)static Object
ConstantBootstraps.getStaticFinal
(MethodHandles.Lookup lookup, String name, Class<?> type, Class<?> declaringClass) Returns the value of a static final field.static MethodHandle
Produces a method handle which returns its sole argument when invoked.Creates a lookup on the specified new lookup class.MethodType.insertParameterTypes
(int num, Class<?>... ptypesToInsert) Finds or creates a method type with additional parameter types.static Object
ConstantBootstraps.invoke
(MethodHandles.Lookup lookup, String name, Class<?> type, MethodHandle handle, Object... args) Returns the result of invoking a method handle with the provided arguments.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<?>[] 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, MethodType 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 Object
ConstantBootstraps.nullConstant
(MethodHandles.Lookup lookup, String name, Class<?> type) Returns anull
object reference for the reference type specified bytype
.static Class<?>
ConstantBootstraps.primitiveClass
(MethodHandles.Lookup lookup, String name, Class<?> type) Returns aClass
mirror for the primitive type whose type descriptor is specified byname
.static MethodHandles.Lookup
MethodHandles.privateLookupIn
(Class<?> targetClass, MethodHandles.Lookup caller) Returns alookup
object on a target class to emulate all supported bytecode behaviors, including private access.<T extends Member>
TMethodHandleInfo.reflectAs
(Class<T> expected, MethodHandles.Lookup lookup) Reflects the underlying member as a method, constructor, or field object.static <T extends Member>
TMethodHandles.reflectAs
(Class<T> expected, MethodHandle target) Performs an unchecked "crack" of a direct method handle.static VarHandle
ConstantBootstraps.staticFieldVarHandle
(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType) Finds aVarHandle
for a static field.static MethodHandle
MethodHandles.throwException
(Class<?> returnType, Class<? extends Throwable> exType) Produces a method handle which will throw exceptions of the givenexType
.static String
MethodHandleInfo.toString
(int kind, Class<?> defc, String name, MethodType type) Returns a string representation for aMethodHandleInfo
, given the four parts of its symbolic reference.MethodHandles.Lookup.unreflectSpecial
(Method m, Class<?> specialCaller) Produces a method handle for a reflected method.static MethodHandle
Produces a constant method handle of the requested return type which returns the default value for that type every time it is invoked.Modifier and TypeMethodDescriptionMethodType.appendParameterTypes
(List<Class<?>> ptypesToInsert) Finds or creates a method type with additional parameter types.static MethodHandle
MethodHandles.dropArguments
(MethodHandle target, int pos, List<Class<?>> valueTypes) Produces a method handle which will discard some dummy arguments before calling some other specified target method handle.static MethodHandle
MethodHandles.dropArgumentsToMatch
(MethodHandle target, int skip, List<Class<?>> newTypes, int pos) Adapts a target method handle to match the given parameter type list.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.static VarHandle
MethodHandles.permuteCoordinates
(VarHandle target, List<Class<?>> newCoordinates, int... reorder) Preview.Provides a var handle which adapts the coordinate values of the target var handle, by re-arranging them so that the new coordinates match the provided ones.ModifierConstructorDescriptionSerializedLambda
(Class<?> capturingClass, String functionalInterfaceClass, String functionalInterfaceMethodName, String functionalInterfaceMethodSignature, int implMethodKind, String implClass, String implMethodName, String implMethodSignature, String instantiatedMethodType, Object[] capturedArgs) Create aSerializedLambda
from the low-level information present at the lambda factory site. -
Uses of Class in java.lang.management
Modifier and TypeMethodDescriptionstatic Set<Class<? extends PlatformManagedObject>>
ManagementFactory.getPlatformManagementInterfaces()
Returns the set ofClass
objects, subinterface ofPlatformManagedObject
, representing all management interfaces for monitoring and managing the Java platform.Modifier and TypeMethodDescriptionstatic <T extends PlatformManagedObject>
TManagementFactory.getPlatformMXBean
(Class<T> mxbeanInterface) Returns the platform MXBean implementing the givenmxbeanInterface
which is specified to have one single instance in the Java virtual machine.static <T extends PlatformManagedObject>
TManagementFactory.getPlatformMXBean
(MBeanServerConnection connection, Class<T> mxbeanInterface) Returns the platform MXBean proxy formxbeanInterface
which is specified to have one single instance in a Java virtual machine and the proxy will forward the method calls through the givenMBeanServerConnection
.static <T extends PlatformManagedObject>
List<T>ManagementFactory.getPlatformMXBeans
(Class<T> mxbeanInterface) Returns the list of platform MXBeans implementing the givenmxbeanInterface
in the Java virtual machine.static <T extends PlatformManagedObject>
List<T>ManagementFactory.getPlatformMXBeans
(MBeanServerConnection connection, Class<T> mxbeanInterface) Returns the list of the platform MXBean proxies for forwarding the method calls of themxbeanInterface
through the givenMBeanServerConnection
.static <T> T
ManagementFactory.newPlatformMXBeanProxy
(MBeanServerConnection connection, String mxbeanName, Class<T> mxbeanInterface) Returns a proxy for a platform MXBean interface of a given MXBean name that forwards its method calls through the givenMBeanServerConnection
. -
Uses of Class in java.lang.reflect
Modifier and TypeMethodDescriptionConstructor.getDeclaringClass()
Returns theClass
object representing the class that declares the constructor represented by this object.abstract Class<?>
Executable.getDeclaringClass()
Returns theClass
object representing the class or interface that declares the executable represented by this object.Class<?>
Field.getDeclaringClass()
Returns theClass
object representing the class or interface that declares the field represented by thisField
object.Class<?>
Member.getDeclaringClass()
Returns the Class object representing the class or interface that declares the member or constructor represented by this Member.Class<?>
Method.getDeclaringClass()
Returns theClass
object representing the class or interface that declares the method represented by this object.Class<?>
RecordComponent.getDeclaringRecord()
Returns the record class which declares this record component.Class<?>[]
Constructor.getExceptionTypes()
Returns an array ofClass
objects that represent the types of exceptions declared to be thrown by the underlying executable represented by this object.abstract Class<?>[]
Executable.getExceptionTypes()
Returns an array ofClass
objects that represent the types of exceptions declared to be thrown by the underlying executable represented by this object.Class<?>[]
Method.getExceptionTypes()
Returns an array ofClass
objects that represent the types of exceptions declared to be thrown by the underlying executable represented by this object.Class<?>[]
Constructor.getParameterTypes()
Returns an array ofClass
objects that represent the formal parameter types, in declaration order, of the executable represented by this object.abstract Class<?>[]
Executable.getParameterTypes()
Returns an array ofClass
objects that represent the formal parameter types, in declaration order, of the executable represented by this object.Class<?>[]
Method.getParameterTypes()
Returns an array ofClass
objects that represent the formal parameter types, in declaration order, of the executable represented by this object.static Class<?>
Proxy.getProxyClass
(ClassLoader loader, Class<?>... interfaces) Deprecated.Proxy classes generated in a named module are encapsulated and not accessible to code outside its module.Class<?>
Method.getReturnType()
Returns aClass
object that represents the formal return type of the method represented by thisMethod
object.Class<?>
Field.getType()
Returns aClass
object that identifies the declared type for the field represented by thisField
object.Class<?>
Parameter.getType()
Returns aClass
object that identifies the declared type for the parameter represented by thisParameter
object.Class<?>
RecordComponent.getType()
Returns aClass
that identifies the declared type for this record component.Modifier and TypeMethodDescription<T extends Annotation>
TAccessibleObject.getAnnotation
(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TAnnotatedElement.getAnnotation
(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TAnnotatedType.getAnnotation
(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TConstructor.getAnnotation
(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TExecutable.getAnnotation
(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TField.getAnnotation
(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TMethod.getAnnotation
(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TParameter.getAnnotation
(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.<T extends Annotation>
TRecordComponent.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.getAnnotationsByType
(Class<T> annotationClass) Returns annotations that are associated with this element.default <T extends Annotation>
T[]AnnotatedElement.getAnnotationsByType
(Class<T> annotationClass) Returns annotations that are associated with this element.<T extends Annotation>
T[]Executable.getAnnotationsByType
(Class<T> annotationClass) Returns annotations that are associated with this element.<T extends Annotation>
T[]Field.getAnnotationsByType
(Class<T> annotationClass) Returns annotations that are associated with this element.<T extends Annotation>
T[]Parameter.getAnnotationsByType
(Class<T> annotationClass) Returns annotations that are associated with this element.<T extends Annotation>
TAccessibleObject.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>
TAnnotatedElement.getDeclaredAnnotation
(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is directly present, else null.<T extends Annotation>
TParameter.getDeclaredAnnotation
(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is directly present, else null.<T extends Annotation>
T[]AccessibleObject.getDeclaredAnnotationsByType
(Class<T> annotationClass) Returns this element's annotation(s) for the specified type if such annotations are either directly present or indirectly present.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.<T extends Annotation>
T[]Parameter.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) Deprecated.Proxy classes generated in a named module are encapsulated and not accessible to code outside its module.boolean
AccessibleObject.isAnnotationPresent
(Class<? extends Annotation> annotationClass) Returns true if an annotation for the specified type is present on this element, else false.default boolean
AnnotatedElement.isAnnotationPresent
(Class<? extends Annotation> annotationClass) Returns true if an annotation for the specified type is present on this element, else false.static boolean
Proxy.isProxyClass
(Class<?> cl) Returns true if the given class is a proxy class.static Object
Array.newInstance
(Class<?> componentType, int length) Creates a new array with the specified component type and length.static Object
Array.newInstance
(Class<?> componentType, int... dimensions) Creates a new array with the specified component type and dimensions.static Object
Proxy.newProxyInstance
(ClassLoader loader, Class<?>[] interfaces, InvocationHandler h) Returns a proxy instance for the specified interfaces that dispatches method invocations to the specified invocation handler. -
Uses of Class in java.lang.runtime
Modifier and TypeMethodDescriptionstatic Object
ObjectMethods.bootstrap
(MethodHandles.Lookup lookup, String methodName, TypeDescriptor type, Class<?> recordClass, String names, MethodHandle... getters) Bootstrap method to generate theObject.equals(Object)
,Object.hashCode()
, andObject.toString()
methods, based on a description of the component names and accessor methods, for eitherinvokedynamic
call sites or dynamic constant pool entries. -
Uses of Class in java.net
Modifier and TypeMethodDescriptionprotected Class<?>
Finds and loads the class with the specified name from the URL search path.SocketOption.type()
Returns the type of the socket option value.Modifier and TypeMethodDescriptionContentHandler.getContent
(URLConnection urlc, Class[] classes) Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified.final Object
URL.getContent
(Class<?>[] classes) Gets the contents of this URL.URLConnection.getContent
(Class<?>[] classes) Retrieves the contents of this URL connection. -
Uses of Class in java.nio.file
Modifier and TypeMethodDescriptionstatic <V extends FileAttributeView>
VFiles.getFileAttributeView
(Path path, Class<V> type, LinkOption... options) Returns a file attribute view of a given type.<V extends FileAttributeView>
VSecureDirectoryStream.getFileAttributeView
(Class<V> type) Returns a new file attribute view to access the file attributes of this directory.<V extends FileAttributeView>
VSecureDirectoryStream.getFileAttributeView
(T path, Class<V> type, LinkOption... options) Returns a new file attribute view to access the file attributes of a file in this directory.abstract <V extends FileStoreAttributeView>
VFileStore.getFileStoreAttributeView
(Class<V> type) Returns aFileStoreAttributeView
of the given type.static <A extends BasicFileAttributes>
AFiles.readAttributes
(Path path, Class<A> type, LinkOption... options) Reads a file's attributes as a bulk operation.abstract boolean
FileStore.supportsFileAttributeView
(Class<? extends FileAttributeView> type) Tells whether or not this file store supports the file attributes identified by the given file attribute view. -
Uses of Class in java.nio.file.spi
Modifier and TypeMethodDescriptionabstract <V extends FileAttributeView>
VFileSystemProvider.getFileAttributeView
(Path path, Class<V> type, LinkOption... options) Returns a file attribute view of a given type.abstract <A extends BasicFileAttributes>
AFileSystemProvider.readAttributes
(Path path, Class<A> type, LinkOption... options) Reads a file's attributes as a bulk operation.<A extends BasicFileAttributes>
AFileSystemProvider.readAttributesIfExists
(Path path, Class<A> type, LinkOption... options) Reads a file's attributes as a bulk operation if it exists. -
Uses of Class in java.rmi.server
Modifier and TypeMethodDescriptionClass<?>
Deprecated.no replacementClass<?>
Deprecated.no replacementstatic Class<?>
Deprecated.replaced byloadClass(String,String)
methodstatic Class<?>
Loads a class from a codebase URL path.static Class<?>
RMIClassLoader.loadClass
(String codebase, String name, ClassLoader defaultLoader) Loads a class from a codebase URL path, optionally using the supplied loader.static Class<?>
Loads a class from a codebase URL.abstract Class<?>
RMIClassLoaderSpi.loadClass
(String codebase, String name, ClassLoader defaultLoader) Provides the implementation forRMIClassLoader.loadClass(URL,String)
,RMIClassLoader.loadClass(String,String)
, andRMIClassLoader.loadClass(String,String,ClassLoader)
.static Class<?>
RMIClassLoader.loadProxyClass
(String codebase, String[] interfaces, ClassLoader defaultLoader) Loads a dynamic proxy class (seeProxy
) that implements a set of interfaces with the given names from a codebase URL path.abstract Class<?>
RMIClassLoaderSpi.loadProxyClass
(String codebase, String[] interfaces, ClassLoader defaultLoader) Provides the implementation forRMIClassLoader.loadProxyClass(String,String[],ClassLoader)
.Modifier and TypeMethodDescriptionstatic String
RMIClassLoader.getClassAnnotation
(Class<?> cl) Returns the annotation string (representing a location for the class definition) that RMI will use to annotate the class descriptor when marshalling objects of the given class.abstract String
RMIClassLoaderSpi.getClassAnnotation
(Class<?> cl) Provides the implementation forRMIClassLoader.getClassAnnotation(Class)
. -
Uses of Class in java.security
Modifier and TypeMethodDescriptionprotected final Class<?>
SecureClassLoader.defineClass
(String name, byte[] b, int off, int len, CodeSource cs) Converts an array of bytes into an instance of classClass
, with an optional CodeSource.protected final Class<?>
SecureClassLoader.defineClass
(String name, ByteBuffer b, CodeSource cs) Converts aByteBuffer
into an instance of classClass
, with an optional CodeSource.Modifier and TypeMethodDescriptionboolean
KeyStoreSpi.engineEntryInstanceOf
(String alias, Class<? extends KeyStore.Entry> entryClass) Determines if the keystoreEntry
for the specifiedalias
is an instance or subclass of the specifiedentryClass
.protected abstract <T extends KeySpec>
TKeyFactorySpi.engineGetKeySpec
(Key key, Class<T> keySpec) Returns a specification (key material) of the given key object.protected abstract <T extends AlgorithmParameterSpec>
TAlgorithmParametersSpi.engineGetParameterSpec
(Class<T> paramSpec) Returns a (transparent) specification of this parameters object.final boolean
KeyStore.entryInstanceOf
(String alias, Class<? extends KeyStore.Entry> entryClass) Determines if the keystoreEntry
for the specifiedalias
is an instance or subclass of the specifiedentryClass
.final <T extends KeySpec>
TKeyFactory.getKeySpec
(Key key, Class<T> keySpec) Returns a specification (key material) of the given key object.final <T extends AlgorithmParameterSpec>
TAlgorithmParameters.getParameterSpec
(Class<T> paramSpec) Returns a (transparent) specification of this parameter object. -
Uses of Class in java.sql
Modifier and TypeMethodDescriptionConnection.getTypeMap()
Retrieves theMap
object associated with thisConnection
object.Modifier and TypeMethodDescription<T> T
Returns an object representing the value of OUT parameterparameterIndex
and will convert from the SQL type of the parameter to the requested Java data type, if the conversion is supported.<T> T
Returns an object representing the value of OUT parameterparameterName
and will convert from the SQL type of the parameter to the requested Java data type, if the conversion is supported.<T> T
Retrieves the value of the designated column in the current row of thisResultSet
object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.<T> T
Retrieves the value of the designated column in the current row of thisResultSet
object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.<T extends Source>
TReturns a Source for reading the XML value designated by this SQLXML instance.boolean
Wrapper.isWrapperFor
(Class<?> iface) Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.default <T> T
SQLInput.readObject
(Class<T> type) Reads the next attribute in the stream and returns it as anObject
in the Java programming language.<T extends Result>
TReturns a Result for setting the XML value designated by this SQLXML instance.<T> T
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.Modifier and TypeMethodDescriptionRetrieves a slice of the SQLARRAY
value designated by thisArray
object, beginning with the specifiedindex
and containing up tocount
successive elements of the SQL array.Retrieves the contents of the SQLARRAY
value designated by thisArray
object.Object[]
Struct.getAttributes
(Map<String, Class<?>> map) Produces the ordered values of the attributes of the SQL structured type that thisStruct
object represents.Returns an object representing the value of OUT parameterparameterIndex
and usesmap
for the custom mapping of the parameter value.Returns an object representing the value of OUT parameterparameterName
and usesmap
for the custom mapping of the parameter value.Retrieves the referenced object and maps it to a Java type using the given type map.Retrieves the value of the designated column in the current row of thisResultSet
object as anObject
in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as anObject
in the Java programming language.Array.getResultSet
(long index, int count, Map<String, Class<?>> map) Retrieves a result set holding the elements of the subarray that starts at indexindex
and contains up tocount
successive elements.Array.getResultSet
(Map<String, Class<?>> map) Retrieves a result set that contains the elements of the SQLARRAY
value designated by thisArray
object.void
Connection.setTypeMap
(Map<String, Class<?>> map) Installs the givenTypeMap
object as the type map for thisConnection
object. -
Uses of Class in java.util
Modifier and TypeMethodDescriptionClass<?>
IllegalFormatConversionException.getArgumentClass()
Returns the class of the mismatched argument.ServiceLoader.Provider.type()
Returns the provider type.Modifier and TypeMethodDescriptionCreates an enum set containing all of the elements in the specified element type.static <E> Collection<E>
Collections.checkedCollection
(Collection<E> c, Class<E> type) Returns a dynamically typesafe view of the specified collection.static <E> List<E>
Collections.checkedList
(List<E> list, Class<E> type) Returns a dynamically typesafe view of the specified list.static <K,
V> Map<K, V> Collections.checkedMap
(Map<K, V> m, Class<K> keyType, Class<V> valueType) Returns a dynamically typesafe view of the specified map.static <K,
V> NavigableMap<K, V> Collections.checkedNavigableMap
(NavigableMap<K, V> m, Class<K> keyType, Class<V> valueType) Returns a dynamically typesafe view of the specified navigable map.static <E> NavigableSet<E>
Collections.checkedNavigableSet
(NavigableSet<E> s, Class<E> type) Returns a dynamically typesafe view of the specified navigable set.static <E> Queue<E>
Collections.checkedQueue
(Queue<E> queue, Class<E> type) Returns a dynamically typesafe view of the specified queue.static <E> Set<E>
Collections.checkedSet
(Set<E> s, Class<E> type) Returns a dynamically typesafe view of the specified set.static <K,
V> SortedMap<K, V> Collections.checkedSortedMap
(SortedMap<K, V> m, Class<K> keyType, Class<V> valueType) Returns a dynamically typesafe view of the specified sorted map.static <E> SortedSet<E>
Collections.checkedSortedSet
(SortedSet<E> s, Class<E> type) Returns a dynamically typesafe view of the specified sorted set.static <T,
U> T[] Copies the specified array, truncating or padding with nulls (if necessary) so the copy has the specified length.static <T,
U> T[] Arrays.copyOfRange
(U[] original, int from, int to, Class<? extends T[]> newType) Copies the specified range of the specified array into a new array.static <S> ServiceLoader<S>
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.static <S> ServiceLoader<S>
ServiceLoader.load
(ModuleLayer layer, Class<S> service) Creates a new service loader for the given service type to load service providers from modules in the given module layer and its ancestors.static <S> ServiceLoader<S>
ServiceLoader.loadInstalled
(Class<S> service) Creates a new service loader for the given service type, using the platform class loader.Creates an empty enum set with the specified element type.ModifierConstructorDescriptionCreates an empty enum map with the specified key type.IllegalFormatConversionException
(char c, Class<?> arg) Constructs an instance of this class with the mismatched conversion and the corresponding argument class. -
Uses of Class in java.util.concurrent.atomic
Modifier and TypeMethodDescriptionstatic <U> AtomicIntegerFieldUpdater<U>
AtomicIntegerFieldUpdater.newUpdater
(Class<U> tclass, String fieldName) Creates and returns an updater for objects with the given field.static <U> AtomicLongFieldUpdater<U>
AtomicLongFieldUpdater.newUpdater
(Class<U> tclass, String fieldName) Creates and returns an updater for objects with the given field.static <U,
W> AtomicReferenceFieldUpdater<U, W> AtomicReferenceFieldUpdater.newUpdater
(Class<U> tclass, Class<W> vclass, String fieldName) Creates and returns an updater for objects with the given field. -
Uses of Class in java.util.prefs
Modifier and TypeMethodDescriptionstatic Preferences
Preferences.systemNodeForPackage
(Class<?> c) Returns the preference node from the system preference tree that is associated (by convention) with the specified class's package.static Preferences
Preferences.userNodeForPackage
(Class<?> c) Returns the preference node from the calling user's preference tree that is associated (by convention) with the specified class's package. -
Uses of Class in javax.annotation.processing
Modifier and TypeMethodDescriptionRoundEnvironment.getElementsAnnotatedWith
(Class<? extends Annotation> a) Returns the elements annotated with the given annotation interface.Modifier and TypeMethodDescriptionRoundEnvironment.getElementsAnnotatedWithAny
(Set<Class<? extends Annotation>> annotations) Returns the elements annotated with one or more of the given annotation interfaces. -
Uses of Class in javax.crypto
Modifier and TypeMethodDescriptionprotected abstract KeySpec
SecretKeyFactorySpi.engineGetKeySpec
(SecretKey key, Class<?> keySpec) Returns a specification (key material) of the given key object in the requested format.final KeySpec
SecretKeyFactory.getKeySpec
(SecretKey key, Class<?> keySpec) Returns a specification (key material) of the given key object in the requested format. -
Uses of Class in javax.imageio.metadata
Modifier and TypeMethodDescriptionClass<?>
IIOMetadataFormat.getObjectClass
(String elementName) Returns theClass
type of theObject
reference stored within the element.Class<?>
IIOMetadataFormatImpl.getObjectClass
(String elementName) Modifier and TypeMethodDescriptionprotected void
IIOMetadataFormatImpl.addObjectValue
(String elementName, Class<?> classType, int arrayMinLength, int arrayMaxLength) Allows anObject
reference of a given class type to be stored in nodes implementing the named element.protected <T> void
IIOMetadataFormatImpl.addObjectValue
(String elementName, Class<T> classType, boolean required, T defaultValue) Allows anObject
reference of a given class type to be stored in nodes implementing the named element.protected <T> void
IIOMetadataFormatImpl.addObjectValue
(String elementName, Class<T> classType, boolean required, T defaultValue, List<? extends T> enumeratedValues) Allows anObject
reference of a given class type to be stored in nodes implementing the named element.protected <T extends Object & Comparable<? super T>>
voidIIOMetadataFormatImpl.addObjectValue
(String elementName, Class<T> classType, T defaultValue, Comparable<? super T> minValue, Comparable<? super T> maxValue, boolean minInclusive, boolean maxInclusive) Allows anObject
reference of a given class type to be stored in nodes implementing the named element. -
Uses of Class in javax.imageio.spi
Modifier and TypeFieldDescriptionprotected Class<?>
ImageInputStreamSpi.inputClass
AClass
object indicating the legal object type for use by thecreateInputStreamInstance
method.protected Class<?>[]
ImageReaderSpi.inputTypes
An array ofClass
objects to be returned fromgetInputTypes
, initiallynull
.protected Class<?>
ImageOutputStreamSpi.outputClass
AClass
object indicating the legal object type for use by thecreateInputStreamInstance
method.protected Class<?>[]
ImageWriterSpi.outputTypes
An array ofClass
objects to be returned fromgetOutputTypes
, initiallynull
.static final Class<?>[]
ImageReaderSpi.STANDARD_INPUT_TYPE
Deprecated.Instead of using this field, directly create the equivalent array{ ImageInputStream.class }
.static final Class<?>[]
ImageWriterSpi.STANDARD_OUTPUT_TYPE
Deprecated.Instead of using this field, directly create the equivalent array{ ImageOutputStream.class }
.Modifier and TypeMethodDescriptionClass<?>
ImageInputStreamSpi.getInputClass()
Returns aClass
object representing the class or interface type that must be implemented by an input source in order to be "wrapped" in anImageInputStream
via thecreateInputStreamInstance
method.Class<?>[]
ImageReaderSpi.getInputTypes()
Returns an array ofClass
objects indicating what types of objects may be used as arguments to the reader'ssetInput
method.Class<?>
ImageOutputStreamSpi.getOutputClass()
Returns aClass
object representing the class or interface type that must be implemented by an output destination in order to be "wrapped" in anImageOutputStream
via thecreateOutputStreamInstance
method.Class<?>[]
ImageWriterSpi.getOutputTypes()
Returns an array ofClass
objects indicating what types of objects may be used as arguments to the writer'ssetOutput
method.Modifier and TypeMethodDescriptionServiceRegistry.getCategories()
Returns anIterator
ofClass
objects indicating the current set of categories.Modifier and TypeMethodDescriptionvoid
ServiceRegistry.deregisterAll
(Class<?> category) Deregisters all service provider object currently registered under the given category.<T> boolean
ServiceRegistry.deregisterServiceProvider
(T provider, Class<T> category) Removes a service provider object from the given category.<T> T
ServiceRegistry.getServiceProviderByClass
(Class<T> providerClass) Returns the currently registered service provider object that is of the given class type.<T> Iterator<T>
ServiceRegistry.getServiceProviders
(Class<T> category, boolean useOrdering) Returns anIterator
containing all registered service providers in the given category.<T> Iterator<T>
ServiceRegistry.getServiceProviders
(Class<T> category, ServiceRegistry.Filter filter, boolean useOrdering) Returns anIterator
containing service provider objects within a given category that satisfy a criterion imposed by the suppliedServiceRegistry.Filter
object'sfilter
method.static <T> Iterator<T>
ServiceRegistry.lookupProviders
(Class<T> providerClass) Locates and incrementally instantiates the available providers of a given service using the context class loader.static <T> Iterator<T>
ServiceRegistry.lookupProviders
(Class<T> providerClass, ClassLoader loader) Searches for implementations of a particular service class using the given class loader.void
IIOServiceProvider.onDeregistration
(ServiceRegistry registry, Class<?> category) A callback that will be whenever the Spi class has been deregistered from aServiceRegistry
.void
RegisterableService.onDeregistration
(ServiceRegistry registry, Class<?> category) Called when an object implementing this interface is removed from the givencategory
of the givenregistry
.void
IIOServiceProvider.onRegistration
(ServiceRegistry registry, Class<?> category) A callback that will be called exactly once after the Spi class has been instantiated and registered in aServiceRegistry
.void
RegisterableService.onRegistration
(ServiceRegistry registry, Class<?> category) Called when an object implementing this interface is added to the givencategory
of the givenregistry
.<T> boolean
ServiceRegistry.registerServiceProvider
(T provider, Class<T> category) Adds a service provider object to the registry.<T> boolean
ServiceRegistry.setOrdering
(Class<T> category, T firstProvider, T secondProvider) Sets a pairwise ordering between two service provider objects within a given category.<T> boolean
ServiceRegistry.unsetOrdering
(Class<T> category, T firstProvider, T secondProvider) Sets a pairwise ordering between two service provider objects within a given category.ModifierConstructorDescriptionImageInputStreamSpi
(String vendorName, String version, Class<?> inputClass) Constructs anImageInputStreamSpi
with a given set of values.ImageOutputStreamSpi
(String vendorName, String version, Class<?> outputClass) Constructs anImageOutputStreamSpi
with a given set of values.ImageReaderSpi
(String vendorName, String version, String[] names, String[] suffixes, String[] MIMETypes, String readerClassName, Class<?>[] inputTypes, String[] writerSpiNames, boolean supportsStandardStreamMetadataFormat, String nativeStreamMetadataFormatName, String nativeStreamMetadataFormatClassName, String[] extraStreamMetadataFormatNames, String[] extraStreamMetadataFormatClassNames, boolean supportsStandardImageMetadataFormat, String nativeImageMetadataFormatName, String nativeImageMetadataFormatClassName, String[] extraImageMetadataFormatNames, String[] extraImageMetadataFormatClassNames) Constructs anImageReaderSpi
with a given set of values.ImageWriterSpi
(String vendorName, String version, String[] names, String[] suffixes, String[] MIMETypes, String writerClassName, Class<?>[] outputTypes, String[] readerSpiNames, boolean supportsStandardStreamMetadataFormat, String nativeStreamMetadataFormatName, String nativeStreamMetadataFormatClassName, String[] extraStreamMetadataFormatNames, String[] extraStreamMetadataFormatClassNames, boolean supportsStandardImageMetadataFormat, String nativeImageMetadataFormatName, String nativeImageMetadataFormatClassName, String[] extraImageMetadataFormatNames, String[] extraImageMetadataFormatClassNames) Constructs anImageWriterSpi
with a given set of values.ModifierConstructorDescriptionServiceRegistry
(Iterator<Class<?>> categories) Constructs aServiceRegistry
instance with a set of categories taken from thecategories
argument. -
Uses of Class in javax.lang.model
Modifier and TypeMethodDescription<A extends Annotation>
AAnnotatedConstruct.getAnnotation
(Class<A> annotationType) Returns this construct's annotation of the specified type if such an annotation is present, elsenull
.<A extends Annotation>
A[]AnnotatedConstruct.getAnnotationsByType
(Class<A> annotationType) Returns annotations that are associated with this construct. -
Uses of Class in javax.lang.model.element
Modifier and TypeMethodDescription<A extends Annotation>
AElement.getAnnotation
(Class<A> annotationType) Returns this construct's annotation of the specified type if such an annotation is present, elsenull
.<A extends Annotation>
A[]Element.getAnnotationsByType
(Class<A> annotationType) Returns annotations that are associated with this construct. -
Uses of Class in javax.lang.model.type
Modifier and TypeMethodDescription<A extends Annotation>
ATypeMirror.getAnnotation
(Class<A> annotationType) Returns this construct's annotation of the specified type if such an annotation is present, elsenull
.<A extends Annotation>
A[]TypeMirror.getAnnotationsByType
(Class<A> annotationType) Returns annotations that are associated with this construct. -
Uses of Class in javax.management
Modifier and TypeMethodDescriptionClass<?>
StandardMBean.getImplementationClass()
Get the class of the implementation of this Standard MBean (or MXBean).final Class<?>
StandardMBean.getMBeanInterface()
Get the Management Interface of this Standard MBean (or MXBean).static Class<?>
Deprecated.Go through the list of class loaders and try to load the requested class.static Class<?>
DefaultLoaderRepository.loadClassWithout
(ClassLoader loader, String className) Deprecated.Go through the list of class loaders but exclude the given class loader, then try to load the requested class.Modifier and TypeMethodDescriptionstatic boolean
JMX.isMXBeanInterface
(Class<?> interfaceClass) Test whether an interface is an MXBean interface.static <T> T
JMX.newMBeanProxy
(MBeanServerConnection connection, ObjectName objectName, Class<T> interfaceClass) Make a proxy for a Standard MBean in a local or remote MBean Server.static <T> T
JMX.newMBeanProxy
(MBeanServerConnection connection, ObjectName objectName, Class<T> interfaceClass, boolean notificationEmitter) Make a proxy for a Standard MBean in a local or remote MBean Server that may also support the methods ofNotificationEmitter
.static <T> T
JMX.newMXBeanProxy
(MBeanServerConnection connection, ObjectName objectName, Class<T> interfaceClass) Make a proxy for an MXBean in a local or remote MBean Server.static <T> T
JMX.newMXBeanProxy
(MBeanServerConnection connection, ObjectName objectName, Class<T> interfaceClass, boolean notificationEmitter) Make a proxy for an MXBean in a local or remote MBean Server that may also support the methods ofNotificationEmitter
.static <T> T
MBeanServerInvocationHandler.newProxyInstance
(MBeanServerConnection connection, ObjectName objectName, Class<T> interfaceClass, boolean notificationBroadcaster) Return a proxy that implements the given interface by forwarding its methods through the given MBean server to the named MBean.ModifierConstructorDescriptionprotected
StandardEmitterMBean
(Class<?> mbeanInterface, boolean isMXBean, NotificationEmitter emitter) Make an MBean whose management interface is specified bymbeanInterface
, and where notifications are handled by the givenNotificationEmitter
.protected
StandardEmitterMBean
(Class<?> mbeanInterface, NotificationEmitter emitter) Make an MBean whose management interface is specified bymbeanInterface
, and where notifications are handled by the givenNotificationEmitter
.StandardEmitterMBean
(T implementation, Class<T> mbeanInterface, boolean isMXBean, NotificationEmitter emitter) Make an MBean whose management interface is specified bymbeanInterface
, with the given implementation and where notifications are handled by the givenNotificationEmitter
.StandardEmitterMBean
(T implementation, Class<T> mbeanInterface, NotificationEmitter emitter) Make an MBean whose management interface is specified bymbeanInterface
, with the given implementation and where notifications are handled by the givenNotificationEmitter
.protected
StandardMBean
(Class<?> mbeanInterface) Make a DynamicMBean out of this, using the specified mbeanInterface class.protected
StandardMBean
(Class<?> mbeanInterface, boolean isMXBean) Make a DynamicMBean out of this, using the specified mbeanInterface class, and choosing whether the resulting MBean is an MXBean.StandardMBean
(T implementation, Class<T> mbeanInterface) Make a DynamicMBean out of the object implementation, using the specified mbeanInterface class.StandardMBean
(T implementation, Class<T> mbeanInterface, boolean isMXBean) Make a DynamicMBean out of the object implementation, using the specified mbeanInterface class, and choosing whether the resultant MBean is an MXBean. -
Uses of Class in javax.management.loading
Modifier and TypeMethodDescriptionprotected Class<?>
Deprecated, for removal: This API element is subject to removal in a future version.This is the main method for class loaders that is being redefined.Class<?>
Load the given class name through the list of class loaders.static Class<?>
Deprecated.Go through the list of class loaders and try to load the requested class.Class<?>
MLet.loadClass
(String name, ClassLoaderRepository clr) Deprecated, for removal: This API element is subject to removal in a future version.Load a class, using the givenClassLoaderRepository
if the class is not found in this MLet's URLs.Class<?>
ClassLoaderRepository.loadClassBefore
(ClassLoader stop, String className) Load the given class name through the list of class loaders, stopping at the given one.Class<?>
ClassLoaderRepository.loadClassWithout
(ClassLoader exclude, String className) Load the given class name through the list of class loaders, excluding the given one.static Class<?>
DefaultLoaderRepository.loadClassWithout
(ClassLoader loader, String className) Deprecated.Go through the list of class loaders but exclude the given class loader, then try to load the requested class. -
Uses of Class in javax.management.openmbean
Modifier and TypeMethodDescriptionstatic <T> ArrayType<T>
ArrayType.getPrimitiveArrayType
(Class<T> arrayClass) Create anArrayType
instance in a type-safe manner. -
Uses of Class in javax.naming.spi
Modifier and TypeMethodDescriptionResolver.resolveToClass
(String name, Class<? extends Context> contextType) Partially resolves a name.Resolver.resolveToClass
(Name name, Class<? extends Context> contextType) Partially resolves a name. -
Uses of Class in javax.print
Modifier and TypeMethodDescriptionClass<?>[]
PrintService.getSupportedAttributeCategories()
Determines the printing attribute categories a client can specify when setting up a job for this print service.Class<?>[]
AttributeException.getUnsupportedAttributes()
Returns the array of printing attribute classes for which the Print Service instance does not support the attribute at all, ornull
if there are no such attributes.Modifier and TypeMethodDescription<T extends PrintServiceAttribute>
TPrintService.getAttribute
(Class<T> category) Gets the value of the single specified service attribute.PrintService.getDefaultAttributeValue
(Class<? extends Attribute> category) Determines this print service's default printing attribute value in the given category.PrintService.getSupportedAttributeValues
(Class<? extends Attribute> category, DocFlavor flavor, AttributeSet attributes) Determines the printing attribute values a client can specify in the given category when setting up a job for this print service.boolean
PrintService.isAttributeCategorySupported
(Class<? extends Attribute> category) Determines whether a client can specify the given printing attribute category when setting up a job for this print service. -
Uses of Class in javax.print.attribute
Modifier and TypeMethodDescriptionAttribute.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value when it is added to an attribute set.static Class<?>
AttributeSetUtilities.verifyAttributeCategory
(Object object, Class<?> interfaceName) Modifier and TypeMethodDescriptionboolean
AttributeSet.containsKey
(Class<?> category) Returnstrue
if this attribute set contains an attribute for the specified category.boolean
HashAttributeSet.containsKey
(Class<?> category) Returnstrue
if this attribute set contains an attribute for the specified category.Returns the attribute value which this attribute set contains in the given attribute category.Returns the attribute value which this attribute set contains in the given attribute category.boolean
Removes any attribute for this category from this attribute set if present.boolean
Removes any attribute for this category from this attribute set if present.static Class<?>
AttributeSetUtilities.verifyAttributeCategory
(Object object, Class<?> interfaceName) static Attribute
AttributeSetUtilities.verifyAttributeValue
(Object object, Class<?> interfaceName) Verify that the given object is an instance of the given interface, which is assumed to be interfaceAttribute
or a subinterface thereof.static void
AttributeSetUtilities.verifyCategoryForValue
(Class<?> category, Attribute attribute) Verify that the given attribute category object is equal to the category of the given attribute value object.ModifierConstructorDescriptionprotected
HashAttributeSet
(Class<?> interfaceName) Construct a new, empty attribute set, where the members of the attribute set are restricted to the given interface.protected
HashAttributeSet
(Attribute[] attributes, Class<?> interfaceName) Construct a new attribute set, where the members of the attribute set are restricted to the given interface.protected
HashAttributeSet
(Attribute attribute, Class<?> interfaceName) Construct a new attribute set, initially populated with the given attribute, where the members of the attribute set are restricted to the given interface.protected
HashAttributeSet
(AttributeSet attributes, Class<?> interfaceName) Construct a new attribute set, initially populated with the values from the given set where the members of the attribute set are restricted to the given interface. -
Uses of Class in javax.print.attribute.standard
Modifier and TypeMethodDescriptionChromaticity.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.ColorSupported.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.Compression.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.Copies.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.CopiesSupported.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.DateTimeAtCompleted.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.DateTimeAtCreation.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.DateTimeAtProcessing.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.Destination.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.DialogOwner.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.DialogTypeSelection.getCategory()
Gets the printing attribute class which is to be used as the "category" for this printing attribute value.DocumentName.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.Fidelity.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.Finishings.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobHoldUntil.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobImpressions.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobImpressionsCompleted.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobImpressionsSupported.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobKOctets.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobKOctetsProcessed.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobKOctetsSupported.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobMediaSheets.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobMediaSheetsCompleted.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobMediaSheetsSupported.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobMessageFromOperator.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobName.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobOriginatingUserName.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobPriority.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobPrioritySupported.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobSheets.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobState.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobStateReason.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.JobStateReasons.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.Media.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.MediaPrintableArea.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.MediaSize.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.MultipleDocumentHandling.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.NumberOfDocuments.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.NumberOfInterveningJobs.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.NumberUp.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.NumberUpSupported.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.OrientationRequested.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.OutputDeviceAssigned.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PageRanges.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PagesPerMinute.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PagesPerMinuteColor.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PDLOverrideSupported.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PresentationDirection.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterInfo.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterIsAcceptingJobs.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterLocation.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterMakeAndModel.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterMessageFromOperator.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterMoreInfo.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterMoreInfoManufacturer.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterName.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterResolution.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterState.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterStateReason.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterStateReasons.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrinterURI.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.PrintQuality.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.QueuedJobCount.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.ReferenceUriSchemesSupported.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.RequestingUserName.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.Severity.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.SheetCollate.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.Sides.getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value. -
Uses of Class in javax.script
Modifier and TypeMethodDescription<T> T
Invocable.getInterface
(Class<T> clasz) Returns an implementation of an interface using functions compiled in the interpreter.<T> T
Invocable.getInterface
(Object thiz, Class<T> clasz) Returns an implementation of an interface using member functions of a scripting object compiled in the interpreter. -
Uses of Class in javax.security.auth
Modifier and TypeMethodDescriptionSubject.getPrincipals
(Class<T> c) Return aSet
of Principals associated with thisSubject
that are instances or subclasses of the specifiedClass
.<T> Set<T>
Subject.getPrivateCredentials
(Class<T> c) Return aSet
of private credentials associated with thisSubject
that are instances or subclasses of the specifiedClass
.<T> Set<T>
Subject.getPublicCredentials
(Class<T> c) Return aSet
of public credentials associated with thisSubject
that are instances or subclasses of the specifiedClass
. -
Uses of Class in javax.sound.midi
Modifier and TypeMethodDescriptionClass<?>
SoundbankResource.getDataClass()
Obtains the class used by this sample to represent its data.ModifierConstructorDescriptionprotected
Instrument
(Soundbank soundbank, Patch patch, String name, Class<?> dataClass) Constructs a new MIDI instrument from the specifiedPatch
.protected
SoundbankResource
(Soundbank soundBank, String name, Class<?> dataClass) Constructs a newSoundbankResource
from the given sound bank and wavetable index. -
Uses of Class in javax.sound.sampled
Modifier and TypeMethodDescriptionClass<?>
Line.Info.getLineClass()
Obtains the class of the line that thisLine.Info
object describes.ModifierConstructorDescriptionInfo
(Class<?> lineClass, AudioFormat format) Constructs a data line's info object from the specified information, which includes a single audio format.Info
(Class<?> lineClass, AudioFormat[] formats, int minBufferSize, int maxBufferSize) Constructs a data line's info object from the specified information, which includes a set of supported audio formats and a range for the buffer size.Info
(Class<?> lineClass, AudioFormat format, int bufferSize) Constructs a data line's info object from the specified information, which includes a single audio format and a desired buffer size.Constructs an info object that describes a line of the specified class.Constructs a port's info object from the information given. -
Uses of Class in javax.sql
Modifier and TypeMethodDescriptionRowSet.getTypeMap()
Retrieves theMap
object associated with thisRowSet
object, which specifies the custom mapping of SQL user-defined types, if any.Modifier and TypeMethodDescriptionvoid
RowSet.setTypeMap
(Map<String, Class<?>> map) Installs the givenjava.util.Map
object as the default type map for thisRowSet
object. -
Uses of Class in javax.sql.rowset
Modifier and TypeMethodDescriptionBaseRowSet.getTypeMap()
Retrieves the type map associated with theConnection
object for thisRowSet
object.Modifier and TypeMethodDescriptionboolean
RowSetMetaDataImpl.isWrapperFor
(Class<?> interfaces) Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.<T> T
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.Modifier and TypeMethodDescriptionvoid
BaseRowSet.setTypeMap
(Map<String, Class<?>> map) Installs the givenjava.util.Map
object as the type map associated with theConnection
object for thisRowSet
object. -
Uses of Class in javax.sql.rowset.serial
Modifier and TypeMethodDescriptionReturns a new array that is a copy of a slice of thisSerialArray
object, starting with the element at the given index and containing the given number of consecutive elements.Returns a new array that is a copy of thisSerialArray
object, using the given type map for the custom mapping of each element when the elements are SQL UDTs.Object[]
SerialStruct.getAttributes
(Map<String, Class<?>> map) Retrieves the attributes for the SQL structured type that thisSerialStruct
represents as an array ofObject
values, using the given type map for custom mapping if appropriate.Returns anObject
representing the SQL structured type to which thisSerialRef
object refers.SerialArray.getResultSet
(long index, int count, Map<String, Class<?>> map) Retrieves a result set holding the elements of the subarray that starts at Retrieves aResultSet
object that contains a subarray of the elements in thisSerialArray
object, starting at index index and containing up to count successive elements.SerialArray.getResultSet
(Map<String, Class<?>> map) Retrieves aResultSet
object that contains all of the elements of the SQLARRAY
value represented by thisSerialArray
object.ModifierConstructorDescriptionSerialArray
(Array array, Map<String, Class<?>> map) Constructs a newSerialArray
object from the givenArray
object, using the given type map for the custom mapping of each element when the elements are SQL UDTs.SerialStruct
(SQLData in, Map<String, Class<?>> map) Constructs aSerialStruct
object from the givenSQLData
object, using the given type map to custom map it to a class in the Java programming language.SerialStruct
(Struct in, Map<String, Class<?>> map) Constructs aSerialStruct
object from the givenStruct
object, using the givenjava.util.Map
object for custom mapping the SQL structured type or any of its attributes that are SQL structured types.SQLInputImpl
(Object[] attributes, Map<String, Class<?>> map) Creates anSQLInputImpl
object initialized with the given array of attributes and the given type map. -
Uses of Class in javax.swing
Modifier and TypeMethodDescriptionClass<?>
JTable.getColumnClass
(int column) Returns the type of the column appearing in the view at column positioncolumn
.Class<? extends ComponentUI>
UIDefaults.getUIClass
(String uiClassID) Returns the L&F class that renders this component.Class<? extends ComponentUI>
UIDefaults.getUIClass
(String uiClassID, ClassLoader uiClassLoader) The value ofget(uidClassID)
must be theString
name of a class that implements the correspondingComponentUI
class.Modifier and TypeMethodDescriptionstatic Container
SwingUtilities.getAncestorOfClass
(Class<?> c, Component comp) Convenience method for searching abovecomp
in the component hierarchy and returns the first object of classc
it finds.JTable.getDefaultEditor
(Class<?> columnClass) Returns the editor to be used when no editor has been set in aTableColumn
.JTable.getDefaultRenderer
(Class<?> columnClass) Returns the cell renderer to be used when no renderer has been set in aTableColumn
.<T extends EventListener>
T[]AbstractListModel.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon this model.<T extends EventListener>
T[]AbstractSpinnerModel.getListeners
(Class<T> listenerType) Return an array of all the listeners of the given type that were added to this model.<T extends EventListener>
T[]DefaultBoundedRangeModel.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon this model.<T extends EventListener>
T[]DefaultButtonModel.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon this model.<T extends EventListener>
T[]DefaultListSelectionModel.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon this model.<T extends EventListener>
T[]DefaultSingleSelectionModel.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon this model.<T extends EventListener>
T[]JComponent.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisJComponent
.<T extends EventListener>
T[]Timer.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisTimer
.static Object
Creates and returns aUIDefault.LazyValue
that loads an image.void
JTable.setDefaultEditor
(Class<?> columnClass, TableCellEditor editor) Sets a default cell editor to be used if no editor has been set in aTableColumn
.void
JTable.setDefaultRenderer
(Class<?> columnClass, TableCellRenderer renderer) Sets a default cell renderer to be used if no renderer has been set in aTableColumn
. -
Uses of Class in javax.swing.event
Modifier and TypeMethodDescription<T extends EventListener>
voidAdds the listener as a listener of the specified type.int
EventListenerList.getListenerCount
(Class<?> t) Returns the total number of listeners of the supplied type for this listener list.<T extends EventListener>
T[]EventListenerList.getListeners
(Class<T> t) Return an array of all the listeners of the given type.<T extends EventListener>
voidRemoves the listener as a listener of the specified type. -
Uses of Class in javax.swing.plaf.synth
Modifier and TypeMethodDescriptionvoid
SynthLookAndFeel.load
(InputStream input, Class<?> resourceBase) Loads the set ofSynthStyle
s that will be used by thisSynthLookAndFeel
. -
Uses of Class in javax.swing.table
Modifier and TypeMethodDescriptionClass<?>
AbstractTableModel.getColumnClass
(int columnIndex) ReturnsObject.class
regardless ofcolumnIndex
.Class<?>
TableModel.getColumnClass
(int columnIndex) Returns the most specific superclass for all the cell values in the column.Modifier and TypeMethodDescription<T extends EventListener>
T[]AbstractTableModel.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon thisAbstractTableModel
.<T extends EventListener>
T[]DefaultTableColumnModel.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon this model. -
Uses of Class in javax.swing.text
Modifier and TypeMethodDescriptionClass<?>
DefaultFormatter.getValueClass()
Returns that class that is used to create new Objects.Modifier and TypeMethodDescription<T extends EventListener>
T[]AbstractDocument.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon this document.<T extends EventListener>
T[]DefaultCaret.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon this caret.<T extends EventListener>
T[]StyleContext.NamedStyle.getListeners
(Class<T> listenerType) Return an array of all the listeners of the given type that were added to this model.void
DefaultFormatter.setValueClass
(Class<?> valueClass) Sets that class that is used to create new Objects. -
Uses of Class in javax.swing.tree
Modifier and TypeMethodDescription<T extends EventListener>
T[]DefaultTreeModel.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon this model.<T extends EventListener>
T[]DefaultTreeSelectionModel.getListeners
(Class<T> listenerType) Returns an array of all the objects currently registered asFooListener
s upon this model. -
Uses of Class in javax.tools
Modifier and TypeMethodDescription<S> ServiceLoader<S>
ForwardingJavaFileManager.getServiceLoader
(JavaFileManager.Location location, Class<S> service) default <S> ServiceLoader<S>
JavaFileManager.getServiceLoader
(JavaFileManager.Location location, Class<S> service) Get a service loader for a specific service class from a given location.DocumentationTool.getTask
(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits) Creates a future for a documentation task with the given components and arguments. -
Uses of Class in javax.xml.xpath
Modifier and TypeMethodDescriptiondefault <T> T
XPath.evaluateExpression
(String expression, Object item, Class<T> type) Evaluate an XPath expression in the specified context and return the result with the type specified through theclass type
default <T> T
XPath.evaluateExpression
(String expression, InputSource source, Class<T> type) Evaluate an XPath expression in the context of the specifiedsource
and return the result as specified.default <T> T
XPathExpression.evaluateExpression
(Object item, Class<T> type) Evaluate the compiled XPath expression in the specified context, and return the result with the type specified through theclass type
.default <T> T
XPathExpression.evaluateExpression
(InputSource source, Class<T> type) Evaluate the compiled XPath expression in the specified context, and return the result with the type specified through theclass type
static QName
XPathEvaluationResult.XPathResultType.getQNameType
(Class<?> clsType) Returns the QName type as specified inXPathConstants
that corresponds to the specified class type. -
Uses of Class in jdk.dynalink.beans
Modifier and TypeMethodDescriptionClass<?>
StaticClass.getRepresentedClass()
Returns the represented Java class.Modifier and TypeMethodDescriptionstatic StaticClass
Retrieves theStaticClass
instance for the specified class.static Object
BeansLinker.getConstructorMethod
(Class<?> clazz, String signature) Return the dynamic method of constructor of the given class and the given signature.BeansLinker.getInstanceMethodNames
(Class<?> clazz) Returns a set of names of all instance methods of a class.BeansLinker.getLinkerForClass
(Class<?> clazz) Returns a bean linker for a particular single class.BeansLinker.getReadableInstancePropertyNames
(Class<?> clazz) Returns a set of names of all readable instance properties of a class.BeansLinker.getReadableStaticPropertyNames
(Class<?> clazz) Returns a set of names of all readable static properties of a class.BeansLinker.getStaticMethodNames
(Class<?> clazz) Returns a set of names of all static methods of a class.BeansLinker.getWritableInstancePropertyNames
(Class<?> clazz) Returns a set of names of all writable instance properties of a class.BeansLinker.getWritableStaticPropertyNames
(Class<?> clazz) Returns a set of names of all writable static properties of a class. -
Uses of Class in jdk.dynalink.linker
Modifier and TypeMethodDescriptionGuardedInvocation.getException()
Returns the exception type that if thrown by the invocation should invalidate the linkage of this guarded invocation.Modifier and TypeMethodDescriptionboolean
LinkerServices.canConvert
(Class<?> from, Class<?> to) Returns true if there might exist a conversion between the requested types (either an automatic JVM conversion, or one provided by any availableGuardingTypeConverterFactory
), or false if there definitely does not exist a conversion between the requested types.boolean
TypeBasedGuardingDynamicLinker.canLinkType
(Class<?> type) Returns true if the linker can link an invocation where the first argument (receiver) is of the specified type.ConversionComparator.compareConversion
(Class<?> sourceType, Class<?> targetType1, Class<?> targetType2) Determines which of the two target types is the preferred conversion target from a source type.LinkerServices.compareConversion
(Class<?> sourceType, Class<?> targetType1, Class<?> targetType2) Determines which of the two type conversions from a source type to the two target types is preferred.GuardingTypeConverterFactory.convertToType
(Class<?> sourceType, Class<?> targetType, Supplier<MethodHandles.Lookup> lookupSupplier) Returns a guarded type conversion that receives a value of the specified source type and returns a value converted to the specified target type.GuardedInvocation.dropArguments
(int pos, Class<?>... valueTypes) Makes an invocation that drops arguments in both the invocation and the guard (if it exists and has at leastpos
parameters) withMethodHandles.dropArguments(MethodHandle, int, Class...)
.LinkerServices.getTypeConverter
(Class<?> sourceType, Class<?> targetType) Given a source and target type, returns a method handle that converts between them.Modifier and TypeMethodDescriptionGuardedInvocation.dropArguments
(int pos, List<Class<?>> valueTypes) Makes an invocation that drops arguments in both the invocation and the guard (if it exists and has at leastpos
parameters) withMethodHandles.dropArguments(MethodHandle, int, List)
.ModifierConstructorDescriptionGuardedInvocation
(MethodHandle invocation, MethodHandle guard, SwitchPoint[] switchPoints, Class<? extends Throwable> exception) Creates a new guarded invocation, with a guard method handle, any number of switch points that can be used to invalidate it, and an exception that if thrown when invoked also invalidates it.GuardedInvocation
(MethodHandle invocation, MethodHandle guard, SwitchPoint switchPoint, Class<? extends Throwable> exception) Creates a new guarded invocation, with a guard method handle, a switch point that can be used to invalidate it, and an exception that if thrown when invoked also invalidates it. -
Uses of Class in jdk.dynalink.linker.support
Modifier and TypeMethodDescriptionstatic Class<?>
TypeUtilities.getPrimitiveType
(Class<?> wrapperType) When passed a class representing a wrapper for a primitive type, returns the class representing the corresponding primitive type.static Class<?>
TypeUtilities.getPrimitiveTypeByName
(String name) Given a name of a primitive type returns the class representing it.static Class<?>
TypeUtilities.getWrapperType
(Class<?> primitiveType) When passed a class representing a primitive type, returns the class representing the corresponding wrapper type.Modifier and TypeMethodDescriptionboolean
CompositeTypeBasedGuardingDynamicLinker.canLinkType
(Class<?> type) Returns true if at least one of the composite linkers returns true fromTypeBasedGuardingDynamicLinker.canLinkType(Class)
for the type.Lookup.findGetter
(Class<?> refc, String name, Class<?> type) Performs aMethodHandles.Lookup.findGetter(Class, String, Class)
, converting any encounteredIllegalAccessException
into anIllegalAccessError
andNoSuchFieldException
into aNoSuchFieldError
.static MethodHandle
Lookup.findOwnSpecial
(MethodHandles.Lookup lookup, String name, Class<?> rtype, Class<?>... ptypes) Given a lookup, finds usingLookup.findSpecial(Class, String, MethodType)
a method on that lookup's class.Lookup.findOwnSpecial
(String name, Class<?> rtype, Class<?>... ptypes) Finds usingLookup.findSpecial(Class, String, MethodType)
a method on that lookup's class.static MethodHandle
Lookup.findOwnStatic
(MethodHandles.Lookup lookup, String name, Class<?> rtype, Class<?>... ptypes) Given a lookup, finds usingLookup.findStatic(Class, String, MethodType)
a method on that lookup's class.Lookup.findOwnStatic
(String name, Class<?> rtype, Class<?>... ptypes) Finds usingLookup.findStatic(Class, String, MethodType)
a method on that lookup's class.Lookup.findSpecial
(Class<?> declaringClass, String name, MethodType type) Performs aMethodHandles.Lookup.findSpecial(Class, String, MethodType, Class)
on the underlying lookup.Lookup.findStatic
(Class<?> declaringClass, String name, MethodType type) Performs aMethodHandles.Lookup.findStatic(Class, String, MethodType)
on the underlying lookup.Lookup.findVirtual
(Class<?> declaringClass, String name, MethodType type) Performs aMethodHandles.Lookup.findVirtual(Class, String, MethodType)
on the underlying lookup.static MethodHandle
Guards.getClassGuard
(Class<?> clazz) Creates a guard method that tests its only argument for being of an exact particular class.static MethodHandle
Guards.getInstanceOfGuard
(Class<?> clazz) Creates a guard method that tests its only argument for being an instance of a particular class.static Class<?>
TypeUtilities.getPrimitiveType
(Class<?> wrapperType) When passed a class representing a wrapper for a primitive type, returns the class representing the corresponding primitive type.static Class<?>
TypeUtilities.getWrapperType
(Class<?> primitiveType) When passed a class representing a primitive type, returns the class representing the corresponding wrapper type.static boolean
TypeUtilities.isConvertibleWithoutLoss
(Class<?> sourceType, Class<?> targetType) Determines whether a type can be converted to another without losing any precision.static MethodHandle
Guards.isInstance
(Class<?> clazz, int pos, MethodType type) Creates a method handle with arguments of a specified type, but with boolean return value.static MethodHandle
Guards.isInstance
(Class<?> clazz, MethodType type) Creates a method handle with arguments of a specified type, but with boolean return value.static boolean
TypeUtilities.isMethodInvocationConvertible
(Class<?> sourceType, Class<?> targetType) Determines whether one type can be converted to another type using a method invocation conversion, as per JLS 5.3 "Method Invocation Conversion".static MethodHandle
Guards.isOfClass
(Class<?> clazz, MethodType type) Creates a guard method handle with arguments of a specified type, but with boolean return value.static boolean
Determines whether one type is a subtype of another type, as per JLS 4.10 "Subtyping".static boolean
TypeUtilities.isWrapperType
(Class<?> type) Returns true if the passed type is a wrapper for a primitive type. -
Uses of Class in jdk.incubator.vector
Modifier and TypeMethodDescriptionVectorOperators.Conversion.domainType()
The domain of this conversion, a primitive type.Vector.elementType()
Returns the primitive element type (ETYPE
) of this vector.VectorSpecies.elementType()
Returns the primitive element type of vectors of this species.Class<? extends VectorMask<E>>
VectorSpecies.maskType()
Returns the vector mask type for this species.VectorOperators.Conversion.rangeType()
The range of this conversion, a primitive type.Class<?>
VectorOperators.Operator.rangeType()
Reports the special return type of this operator.VectorSpecies.vectorType()
Returns the vector type of this species.Modifier and TypeMethodDescriptionabstract <F> Vector<F>
Checks that this vector has the given element type, and returns this vector unchanged.abstract <F> VectorMask<F>
Checks that this mask applies to vectors with the given element type, and returns this mask unchanged.<E,
F> VectorOperators.Conversion<E, F> Ensures that this conversion has the desired domain and range types.<F> VectorSpecies<F>
Checks that this species has the given element type, and returns this species unchanged.boolean
VectorOperators.Operator.compatibleWith
(Class<?> elementType) Reports whether this operator is compatible with the proposed element type.static int
VectorSpecies.elementSize
(Class<?> elementType) Returns the bit-size of the given vector element type (ETYPE
).static <E> VectorSpecies<E>
VectorSpecies.of
(Class<E> elementType, VectorShape shape) Finds a species for an element type and shape.static <E,
F> VectorOperators.Conversion<E, F> The Java language assignment or casting conversion between two types.static <E> VectorSpecies<E>
VectorSpecies.ofLargestShape
(Class<E> etype) Finds the largest vector species of the given element type.static <E> VectorSpecies<E>
VectorSpecies.ofPreferred
(Class<E> etype) Finds the species preferred by the current platform for a given vector element type.static <E,
F> VectorOperators.Conversion<E, F> VectorOperators.Conversion.ofReinterpret
(Class<E> from, Class<F> to) The bitwise reinterpretation between two types.<E> VectorSpecies<E>
Finds a vector species with the given element type and the current shape.<F> VectorSpecies<F>
Finds a species with the given element type and the same shape as this species. -
Uses of Class in jdk.jfr
Modifier and TypeMethodDescriptionstatic void
FlightRecorder.addPeriodicEvent
(Class<? extends Event> eventClass, Runnable hook) Adds a hook for a periodic event.Disables event.Enables event.final <A> A
AnnotationElement.getAnnotation
(Class<? extends Annotation> annotationType) Returns the first annotation for the specified type if anAnnotationElement
with the same name exists, elsenull
.<A extends Annotation>
AEventType.getAnnotation
(Class<A> annotationClass) Returns the first annotation for the specified type if an annotation element with the same name is directly present, otherwisenull
.<A extends Annotation>
ASettingDescriptor.getAnnotation
(Class<A> annotationType) Returns the first annotation for the specified type if an annotation element with the same name is available,null
otherwise.<A extends Annotation>
AValueDescriptor.getAnnotation
(Class<A> annotationType) Returns the first annotation for the specified type if an annotation element with the same name is directly present for this value descriptor,null
otherwise.static EventType
EventType.getEventType
(Class<? extends Event> eventClass) Returns the event type for an event class, ornull
if it doesn't exist.static void
Registers an event class.static void
FlightRecorder.unregister
(Class<? extends Event> eventClass) Unregisters an event class.ModifierConstructorDescriptionAnnotationElement
(Class<? extends Annotation> annotationType) Creates an annotation element to use for dynamically defined events.AnnotationElement
(Class<? extends Annotation> annotationType, Object value) Creates an annotation element to use for dynamically defined events.AnnotationElement
(Class<? extends Annotation> annotationType, Map<String, Object> values) Creates an annotation element to use for dynamically defined events.ValueDescriptor
(Class<?> type, String name) Constructs a value descriptor, useful for dynamically creating event types and annotations.ValueDescriptor
(Class<?> type, String name, List<AnnotationElement> annotations) Constructs a value descriptor, useful for dynamically creating event types and annotations. -
Uses of Class in jdk.jfr.consumer
Modifier and TypeMethodDescriptionDisables event.Enables event. -
Uses of Class in jdk.jshell.execution
-
Uses of Class in jdk.net
Modifier and TypeMethodDescriptionstatic Set<SocketOption<?>>
Sockets.supportedOptions
(Class<?> socketType) Deprecated, for removal: This API element is subject to removal in a future version.
defineClass(String, byte[], int, int)