Returns the package name of clazz according to the Java Language Specification (section 6.7). Unlike Class#getPackage, this method only parses the class name, without attempting to define the Package and hence load files.
(Class<?> clazz)
| 42 | |
| 43 | |
| 44 | public static String getPackageName(Class<?> clazz) { |
| 45 | return getPackageName(clazz.getName()); |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Returns the package name of {@code classFullName} according to the Java Language Specification |
no test coverage detected