Enum Classes
- All Implemented Interfaces:
Serializable, Comparable<Classes>, java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?> childClassOf(Class<?> parentClass, Object instance) Returns the class of the immediate subclass of the given parent class for the given object instance; or null if such immediate subclass cannot be uniquely identified for the given object instance.static JarFileReturns the jar file from which the given class is loaded; or null if no such jar file can be located.static ClassesReturns the enum constant of this type with the specified name.static Classes[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
childClassOf
Returns the class of the immediate subclass of the given parent class for the given object instance; or null if such immediate subclass cannot be uniquely identified for the given object instance.- Parameters:
parentClass- the parent class. The child class isObjectif and only if the parent class is null.instance- the given object instance
-
jarFileOf
-