Package | Description |
---|---|
java.lang |
Provides classes that are fundamental to the design of the Java
programming language.
|
java.lang.annotation |
Provides library support for the Java programming language annotation facility.
|
java.nio.file |
Defines interfaces and classes for the Java virtual machine to access files,
file attributes, and file systems.
|
java.util |
Contains the collections framework, legacy collection classes, event model,
date and time facilities, random-number generator, and miscellaneous utility
classes.
|
Modifier and Type | Field and Description |
---|---|
static Class<Short> |
Short.TYPE
The
Class instance representing the primitive type
short . |
static Class<Long> |
Long.TYPE
The
Class instance representing the primitive type
long . |
static Class<Integer> |
Integer.TYPE
The
Class instance representing the primitive type
int . |
static Class<Float> |
Float.TYPE
The
Class instance representing the primitive type
float . |
static Class<Double> |
Double.TYPE
The
Class instance representing the primitive type
double . |
static Class<Character> |
Character.TYPE
The
Class instance representing the primitive type
char . |
static Class<Byte> |
Byte.TYPE
The
Class instance representing the primitive type
byte . |
static Class<Boolean> |
Boolean.TYPE
The Class object representing the primitive type boolean.
|
Modifier and Type | Method and Description |
---|---|
<U> Class<? extends U> |
Class.asSubclass(Class<U> clazz)
Casts this
Class object to represent a subclass of the class
represented by the specified class object. |
static Class<?> |
Class.forName(String className)
Returns the
Class object associated with the class or
interface with the given string name. |
Class<?> |
Object.getClass()
Returns the runtime class of this
Object . |
Class<E> |
Enum.getDeclaringClass()
Returns the Class object corresponding to this enum constant's
enum type.
|
Class<? super T> |
Class.getSuperclass()
Returns the
Class representing the superclass of the entity
(class, interface, primitive type or void) represented by this
Class . |
Modifier and Type | Method and Description |
---|---|
<U> Class<? extends U> |
Class.asSubclass(Class<U> clazz)
Casts this
Class object to represent a subclass of the class
represented by the specified class object. |
boolean |
Class.isAssignableFrom(Class<?> cls)
Determines if the class or interface represented by this
Class object is either the same as, or is a superclass or
superinterface of, the class or interface represented by the specified
Class parameter. |
static <T extends Enum<T>> |
Enum.valueOf(Class<T> enumType,
String name)
Returns the enum constant of the specified enum type with the
specified name.
|
Modifier and Type | Method and Description |
---|---|
Class<? extends Annotation> |
Annotation.annotationType()
Returns the annotation type of this annotation.
|
Modifier and Type | Method and Description |
---|---|
static <A extends BasicFileAttributes> |
Files.readAttributes(Path path,
Class<A> type,
LinkOption... options)
Reads a file's attributes as a bulk operation.
|
Modifier and Type | Method and Description |
---|---|
static <T,U> T[] |
Arrays.copyOf(U[] original,
int newLength,
Class<? extends T[]> newType)
Copies the specified array, truncating or padding with nulls (if necessary)
so the copy has the specified length.
|
static <S> ServiceLoader<S> |
ServiceLoader.load(Class<S> service)
Creates a new service loader for the given service type.
|
Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. Use of this specification is subject to license terms.