MCPcopy Create free account
hub / github.com/antlr/codebuff / getPackageName

Method getPackageName

output/java_guava/1.4.17/Reflection.java:44–46  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 1

getPackageNameMethod · 0.95

Calls 2

getNameMethod · 0.45
lastIndexOfMethod · 0.45

Tested by

no test coverage detected