MCPcopy
hub / github.com/google/guava / getPackageName

Method getPackageName

guava/src/com/google/common/reflect/Reflection.java:35–37  ·  view source on GitHub ↗

Returns the package name of {@code clazz} according to the Java Language Specification (section 6.7). Unlike {@link Class#getPackage}, this method only parses the class name, without attempting to define the {@link Package} and hence load files.

(Class<?> clazz)

Source from the content-addressed store, hash-verified

33 * attempting to define the {@link Package} and hence load files.
34 */
35 public static String getPackageName(Class<?> clazz) {
36 return getPackageName(clazz.getName());
37 }
38
39 /**
40 * Returns the package name of {@code classFullName} according to the Java Language Specification

Callers 7

getPackageNameMethod · 0.95
testGetPackageNameMethod · 0.95
testNullsMethod · 0.95
getVisibleMethodsMethod · 0.95
testGetPackageNameMethod · 0.45

Calls 2

getNameMethod · 0.45
lastIndexOfMethod · 0.45

Tested by 6

testGetPackageNameMethod · 0.76
testNullsMethod · 0.76
getVisibleMethodsMethod · 0.76
testGetPackageNameMethod · 0.36