T
- the type of the class modeled by this Class
object. For example, the type of String.class
is Class<String>
. Use Class<?>
if the class being modeled is unknown.
Serializable
, Constable
, TypeDescriptor
, TypeDescriptor.OfField<Class<?>>
, AnnotatedElement
, GenericDeclaration
, Type
Returns an unmodifiable set of the
access flagsfor this class, possibly empty.
Returns a
Class
for an array type whose component type is described by this
Class.
Casts this Class
object to represent a subclass of the class represented by the specified class object.
Casts an object to the class or interface represented by this Class
object.
Returns the component type of this Class
, if it describes an array type, or null
otherwise.
Returns a nominal descriptor for this instance, if one can be constructed, or an empty
Optional
if one cannot be.
Returns the descriptor string of the entity (class, interface, array class, primitive type, or void
) represented by this Class
object.
boolean
Returns the assertion status that would be assigned to this class if it were to be initialized at the time this method is invoked.
Returns the
Class
with the given
binary namein the given module.
Returns the Class
object associated with the class or interface with the given string name.
Returns the Class
object associated with the class or interface with the given string name, using the given class loader.
Returns the
Class
object associated with the
primitive typeof the given name.
Returns an array of AnnotatedType
objects that represent the use of types to specify superinterfaces of the entity represented by this Class
object.
Returns an AnnotatedType
object that represents the use of a type to specify the superclass of the entity represented by this Class
object.
Returns this element's annotation for the specified type if such an annotation is present, else null.
Returns annotations that are present on this element.
Returns annotations that are associated with this element.
Returns the canonical name of the underlying class as defined by The Java Language Specification.
Returns an array containing Class
objects representing all the public classes and interfaces that are members of the class represented by this Class
object.
Returns the class loader for the class.
Returns the Class
representing the component type of an array.
Returns a Constructor
object that reflects the specified public constructor of the class represented by this Class
object.
Returns an array containing Constructor
objects reflecting all the public constructors of the class represented by this Class
object.
Returns this element's annotation for the specified type if such an annotation is directly present, else null.
Returns annotations that are directly present on this element.
Returns this element's annotation(s) for the specified type if such annotations are either directly present or indirectly present.
Returns an array of Class
objects reflecting all the classes and interfaces declared as members of the class represented by this Class
object.
Returns a Constructor
object that reflects the specified constructor of the class represented by this Class
object.
Returns an array of Constructor
objects reflecting all the constructors implicitly or explicitly declared by the class represented by this Class
object.
Returns a Field
object that reflects the specified declared field of the class or interface represented by this Class
object.
Returns an array of Field
objects reflecting all the fields declared by the class or interface represented by this Class
object.
Returns a Method
object that reflects the specified declared method of the class or interface represented by this Class
object.
Returns an array containing Method
objects reflecting all the declared methods of the class or interface represented by this Class
object, including public, protected, default (package) access, and private methods, but excluding inherited methods.
If the class or interface represented by this Class
object is a member of another class, returns the Class
object representing the class in which it was declared.
Returns the immediately enclosing class of the underlying class.
If this
Class
object represents a local or anonymous class within a constructor, returns a
Constructor
object representing the immediately enclosing constructor of the underlying class.
If this
Class
object represents a local or anonymous class within a method, returns a
Method
object representing the immediately enclosing method of the underlying class.
Returns the elements of this enum class or null if this Class object does not represent an enum class.
Returns a Field
object that reflects the specified public member field of the class or interface represented by this Class
object.
Returns an array containing Field
objects reflecting all the accessible public fields of the class or interface represented by this Class
object.
Returns the Type
s representing the interfaces directly implemented by the class or interface represented by this Class
object.
Returns the Type
representing the direct superclass of the entity (class, interface, primitive type or void) represented by this Class
object.
Returns the interfaces directly implemented by the class or interface represented by this Class
object.
Returns a Method
object that reflects the specified public member method of the class or interface represented by this Class
object.
Returns an array containing Method
objects reflecting all the public methods of the class or interface represented by this Class
object, including those declared by the class or interface and those inherited from superclasses and superinterfaces.
int
Returns the Java language modifiers for this class or interface, encoded in an integer.
Returns the module that this class or interface is a member of.
Returns the name of the entity (class, interface, array class, primitive type, or void) represented by this Class
object.
Returns the nest host of the
nestto which the class or interface represented by this
Class
object belongs.
Returns an array containing Class
objects representing all the classes and interfaces that are members of the nest to which the class or interface represented by this Class
object belongs.
Gets the package of this class.
Returns the fully qualified package name.
Returns an array containing Class
objects representing the direct subinterfaces or subclasses permitted to extend or implement this class or interface if it is sealed.
Returns the ProtectionDomain
of this class.
Returns an array of RecordComponent
objects representing all the record components of this record class, or null
if this class is not a record class.
Finds a resource with a given name.
Finds a resource with a given name.
Gets the signers of this class.
Returns the simple name of the underlying class as given in the source code.
Returns the Class
representing the direct superclass of the entity (class, interface, primitive type or void) represented by this Class
.
Return an informative string for the name of this class or interface.
Returns an array of TypeVariable
objects that represent the type variables declared by the generic declaration represented by this GenericDeclaration
object, in declaration order.
boolean
Returns true if this Class
object represents an annotation interface.
boolean
Returns true if an annotation for the specified type is present on this element, else false.
boolean
Returns true
if and only if the underlying class is an anonymous class.
boolean
Determines if this Class
object represents an array class.
boolean
Determines if the class or interface represented by this Class
object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified Class
parameter.
boolean
Returns true if and only if this class was declared as an enum in the source code.
boolean
Returns true
if and only if the underlying class is a hidden class.
boolean
Determines if the specified Object
is assignment-compatible with the object represented by this Class
.
boolean
Determines if this Class
object represents an interface type.
boolean
Returns true
if and only if the underlying class is a local class.
boolean
Returns true
if and only if the underlying class is a member class.
boolean
Determines if the given Class
is a nestmate of the class or interface represented by this Class
object.
boolean
Determines if this Class
object represents a primitive type or void.
boolean
Returns true
if and only if this class is a record class.
boolean
Returns true
if and only if this Class
object represents a sealed class or interface.
boolean
Returns true
if and only if this class has the synthetic modifier bit set.
Returns a string describing this
Class
, including information about modifiers,
sealed
/
non-sealed
status, and type parameters.
Converts the object to a string.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4