Class PackageInfo

java.lang.Object
org.tentackle.maven.PackageInfo

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

    • PackageInfo

      public PackageInfo(String name, org.apache.maven.project.MavenProject project, 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 Details

    • getName

      public 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 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 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(List<PackageInfo> emptyDuplicates)
      Sets the duplicates.
      Parameters:
      emptyDuplicates - the duplicates
    • toString

      public String toString()
      Overrides:
      toString in class Object