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 intcompareTo(ModuleInfo o)booleanequals(Object o)AnnotationInfoListgetAnnotationInfo()Get any annotations on thepackage-info.classfile.AnnotationInfogetAnnotationInfo(String annotationName)Get a the named annotation on this module, or null if the module does not have the named annotation.ClassInfoListgetClassInfo()Get theClassInfoobjects for all classes that are members of this package.ClassInfogetClassInfo(String className)Get theClassInfoobject for the named class in this module, or null if the class was not found in this module.URIgetLocation()The module location.ModuleRefgetModuleRef()TheModuleReffor this module.StringgetName()The module name ("<unnamed>"for the unnamed module).PackageInfoListgetPackageInfo()Get thePackageInfoobjects for all packages that are members of this module.PackageInfogetPackageInfo(String packageName)Get thePackageInfoobject for the named packagein this module, or null if the package was not found in this module.booleanhasAnnotation(String annotationName)inthashCode()StringtoString()
-
-
-
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 theClassInfoobject for the named class in this module, or null if the class was not found in this module.
-
getClassInfo
public ClassInfoList getClassInfo()
Get theClassInfoobjects for all classes that are members of this package.
-
getPackageInfo
public PackageInfo getPackageInfo(String packageName)
Get thePackageInfoobject for the named packagein this module, or null if the package was not found in this module.
-
getPackageInfo
public PackageInfoList getPackageInfo()
Get thePackageInfoobjects 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
AnnotationInfoobject 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.classfile.
-
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:
compareToin interfaceComparable<ModuleInfo>
-
-