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

Class ModuleInfo

src/main/java/io/github/classgraph/ModuleInfo.java:41–356  ·  view source on GitHub ↗

Holds metadata about a package encountered during a scan.

Source from the content-addressed store, hash-verified

39
40/** Holds metadata about a package encountered during a scan. */
41public class ModuleInfo implements Comparable<ModuleInfo>, HasName {
42 /** The name of the module. */
43 private String name;
44
45 /** The classpath element. */
46 private transient ClasspathElement classpathElement;
47
48 /** The {@link ModuleRef}. */
49 private transient ModuleRef moduleRef;
50
51 /** The location of the module as a URI. */
52 private transient URI locationURI;
53
54 /**
55 * Unique {@link AnnotationInfo} objects for any annotations on the module-info.class file, if present, else
56 * null.
57 */
58 private Set<AnnotationInfo> annotationInfoSet;
59
60 /** {@link AnnotationInfo} objects for any annotations on the module-info.class file, if present, else null. */
61 private AnnotationInfoList annotationInfo;
62
63 /** {@link PackageInfo} objects for packages found within the class, if any, else null. */
64 private Set<PackageInfo> packageInfoSet;
65
66 /** Set of classes in the module. */
67 private Set<ClassInfo> classInfoSet;
68
69 // -------------------------------------------------------------------------------------------------------------
70
71 /** Deerialization constructor. */
72 ModuleInfo() {
73 // Empty
74 }
75
76 /**
77 * Construct a ModuleInfo object.
78 *
79 * @param moduleRef
80 * the module ref
81 * @param classpathElement
82 * the classpath element
83 */
84 ModuleInfo(final ModuleRef moduleRef, final ClasspathElement classpathElement) {
85 this.moduleRef = moduleRef;
86 this.classpathElement = classpathElement;
87 this.name = classpathElement.getModuleName();
88 }
89
90 /**
91 * The module name, or {@code ""} for the unnamed module.
92 *
93 * @return the module name, or {@code ""} for the unnamed module.
94 */
95 @Override
96 public String getName() {
97 return name;
98 }

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…