MCPcopy Index your code
hub / github.com/classgraph/classgraph / PackageInfo

Class PackageInfo

src/main/java/io/github/classgraph/PackageInfo.java:44–387  ·  view source on GitHub ↗

Holds metadata about a package encountered during a scan.

Source from the content-addressed store, hash-verified

42
43/** Holds metadata about a package encountered during a scan. */
44public class PackageInfo implements Comparable<PackageInfo>, HasName {
45 /** Name of the package. */
46 private String name;
47
48 /**
49 * Unique {@link AnnotationInfo} objects for any annotations on the package-info.class file, if present, else
50 * null.
51 */
52 private Set<AnnotationInfo> annotationInfoSet;
53
54 /** {@link AnnotationInfo} for any annotations on the package-info.class file, if present, else null. */
55 private AnnotationInfoList annotationInfo;
56
57 /** The parent package of this package. */
58 private PackageInfo parent;
59
60 /** The child packages of this package. */
61 private Set<PackageInfo> children;
62
63 /** Set of classes in the package. */
64 private Map<String, ClassInfo> memberClassNameToClassInfo;
65
66 // -------------------------------------------------------------------------------------------------------------
67
68 /** Deerialization constructor. */
69 PackageInfo() {
70 // Empty
71 }
72
73 /**
74 * Construct a PackageInfo object.
75 *
76 * @param packageName
77 * the package name
78 */
79 PackageInfo(final String packageName) {
80 this.name = packageName;
81 }
82
83 /**
84 * The package name ("" for the root package).
85 *
86 * @return the name
87 */
88 @Override
89 public String getName() {
90 return name;
91 }
92
93 // -------------------------------------------------------------------------------------------------------------
94
95 /**
96 * Add annotations found in a package descriptor classfile.
97 *
98 * @param packageAnnotations
99 * the package annotations
100 */
101 void addAnnotations(final AnnotationInfoList packageAnnotations) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…