Returns the enum constant's declaring class. @return the class object representing the constant's enum type.
()
| 137 | * @return the class object representing the constant's enum type. |
| 138 | */ |
| 139 | @SuppressWarnings("unchecked") |
| 140 | public final Class<E> getDeclaringClass() { |
| 141 | Class<?> myClass = getClass(); |
| 142 | Class<?> mySuperClass = myClass.getSuperclass(); |
| 143 | if (Enum.class == mySuperClass) { |
| 144 | return (Class<E>)myClass; |
| 145 | } |
| 146 | return (Class<E>)mySuperClass; |
| 147 | } |
| 148 | |
| 149 | /** |
| 150 | * Returns the constant with the specified name of the specified enum type. |
nothing calls this directly
no test coverage detected