Package io.github.classgraph
Class ModuleInfo
- java.lang.Object
-
- io.github.classgraph.ModuleInfo
-
- All Implemented Interfaces:
Comparable<ModuleInfo>
public class ModuleInfo extends Object implements Comparable<ModuleInfo>
Holds metadata about a package encountered during a scan.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ModuleInfo o)
boolean
equals(Object o)
AnnotationInfoList
getAnnotationInfo()
Get any annotations on thepackage-info.class
file.AnnotationInfo
getAnnotationInfo(String annotationName)
Get a the named annotation on this module, or null if the module does not have the named annotation.ClassInfoList
getClassInfo()
Get theClassInfo
objects for all classes that are members of this package.ClassInfo
getClassInfo(String className)
Get theClassInfo
object for the named class in this module, or null if the class was not found in this module.URI
getLocation()
The module location.ModuleRef
getModuleRef()
TheModuleRef
for this module.String
getName()
The module name ("<unnamed>"
for the unnamed module).PackageInfoList
getPackageInfo()
Get thePackageInfo
objects for all packages that are members of this module.PackageInfo
getPackageInfo(String packageName)
Get thePackageInfo
object for the named packagein this module, or null if the package was not found in this module.boolean
hasAnnotation(String annotationName)
int
hashCode()
String
toString()
-
-
-
Method Detail
-
getName
public String getName()
The module name ("<unnamed>"
for the unnamed module).
-
getLocation
public URI getLocation()
The module location.
-
getClassInfo
public ClassInfo getClassInfo(String className)
Get theClassInfo
object for the named class in this module, or null if the class was not found in this module.
-
getClassInfo
public ClassInfoList getClassInfo()
Get theClassInfo
objects for all classes that are members of this package.
-
getPackageInfo
public PackageInfo getPackageInfo(String packageName)
Get thePackageInfo
object for the named packagein this module, or null if the package was not found in this module.
-
getPackageInfo
public PackageInfoList getPackageInfo()
Get thePackageInfo
objects for all packages that are members of this module.
-
getAnnotationInfo
public AnnotationInfo getAnnotationInfo(String annotationName)
Get a the named annotation on this module, or null if the module does not have the named annotation.- Parameters:
annotationName
- The annotation name.- Returns:
- An
AnnotationInfo
object representing the named annotation on this module, or null if the module does not have the named annotation.
-
getAnnotationInfo
public AnnotationInfoList getAnnotationInfo()
Get any annotations on thepackage-info.class
file.
-
hasAnnotation
public boolean hasAnnotation(String annotationName)
- Parameters:
annotationName
- The name of an annotation.- Returns:
- true if this module has the named annotation.
-
compareTo
public int compareTo(ModuleInfo o)
- Specified by:
compareTo
in interfaceComparable<ModuleInfo>
-
-