You can’t see this method in javadoc because it’s added by the compiler.
Documented in three places :
- Enum Types, from The Java Tutorials
The compiler automatically adds some special methods when it creates
an enum. For example, they have a static values method that returns an
array containing all of the values of the enum in the order they are
declared. This method is commonly used in combination with the
for-each construct to iterate over the values of an enum type.
Enum.valueOf
class
(The special implicitvalues
method is mentioned in description ofvalueOf
method)
All the constants of an enum type can be obtained by calling the implicit public static T[] values() method of that type.
The values
function simply list all values of the enumeration.