Class PackageInfo


  • public class PackageInfo
    extends java.lang.Object
    Contains info about a java package.
    • Constructor Summary

      Constructors 
      Constructor Description
      PackageInfo​(java.lang.String name, org.apache.maven.project.MavenProject project, java.io.File path)
      Creates a package info.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<PackageInfo> getEmptyDuplicates()
      Gets the empty duplicates for this package info.
      If an empty package is found more than once in different modules, it cannot be used in profiles because the generator cannot decide which one to use.
      java.lang.String getName()
      Gets the package name.
      java.io.File getPath()
      Gets the directory path of the package.
      org.apache.maven.project.MavenProject getProject()
      Gets the maven project containing the package.
      boolean isContainingFiles()
      Determines whether this package contains any files.
      The method is used to detect split packages which are forbidden in JPMS.
      void setEmptyDuplicates​(java.util.List<PackageInfo> emptyDuplicates)
      Sets the duplicates.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PackageInfo

        public PackageInfo​(java.lang.String name,
                           org.apache.maven.project.MavenProject project,
                           java.io.File path)
        Creates a package info.
        Parameters:
        name - the java package name
        project - the maven project containing the package
        path - the directory path of the package
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the package name.
        Returns:
        the java package name
      • getProject

        public org.apache.maven.project.MavenProject getProject()
        Gets the maven project containing the package.
        Returns:
        the maven project
      • getPath

        public java.io.File getPath()
        Gets the directory path of the package.
        Returns:
        the path
      • isContainingFiles

        public boolean isContainingFiles()
        Determines whether this package contains any files.
        The method is used to detect split packages which are forbidden in JPMS.
        Returns:
        true if not empty, false if no files found
      • getEmptyDuplicates

        public java.util.List<PackageInfo> getEmptyDuplicates()
        Gets the empty duplicates for this package info.
        If an empty package is found more than once in different modules, it cannot be used in profiles because the generator cannot decide which one to use.
        Returns:
        the duplicates, null if none
      • setEmptyDuplicates

        public void setEmptyDuplicates​(java.util.List<PackageInfo> emptyDuplicates)
        Sets the duplicates.
        Parameters:
        emptyDuplicates - the duplicates
      • toString

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