Class ModuleInfo

  • All Implemented Interfaces:
    java.lang.Comparable<ModuleInfo>

    public class ModuleInfo
    extends java.lang.Object
    implements java.lang.Comparable<ModuleInfo>
    Holds metadata about a package encountered during a scan.
    • Method Detail

      • getName

        public java.lang.String getName()
        The module name ("<unnamed>" for the unnamed module).
      • getLocation

        public java.net.URI getLocation()
        The module location.
      • getClassInfo

        public ClassInfo getClassInfo​(java.lang.String className)
        Get the ClassInfo object for the named class in this module, or null if the class was not found in this module.
      • getClassInfo

        public ClassInfoList getClassInfo()
        Get the ClassInfo objects for all classes that are members of this package.
      • getPackageInfo

        public PackageInfo getPackageInfo​(java.lang.String packageName)
        Get the PackageInfo object for the named packagein this module, or null if the package was not found in this module.
      • getPackageInfo

        public PackageInfoList getPackageInfo()
        Get the PackageInfo objects for all packages that are members of this module.
      • getAnnotationInfo

        public AnnotationInfo getAnnotationInfo​(java.lang.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 the package-info.class file.
      • hasAnnotation

        public boolean hasAnnotation​(java.lang.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 interface java.lang.Comparable<ModuleInfo>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object