java.lang.Object
org.junit.platform.engine.support.descriptor.PackageSource
All Implemented Interfaces:
Serializable, TestSource

@API(status=STABLE, since="1.0") public class PackageSource extends Object implements TestSource
Package based TestSource.

This class stores the package name because Package does not implement Serializable.

Since:
1.0
See Also:
  • Method Details

    • from

      public static PackageSource from(Package javaPackage)
      Create a new PackageSource using the supplied Java Package.
      Parameters:
      javaPackage - the Java package; must not be null
    • from

      public static PackageSource from(String packageName)
      Create a new PackageSource using the supplied packageName.
      Parameters:
      packageName - the package name; must not be null or blank
    • getPackageName

      public final String getPackageName()
      Get the package name of this test source.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object