Class PackageSource
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.PackageSource
-
- All Implemented Interfaces:
java.io.Serializable
,TestSource
@API(status=STABLE, since="1.0") public class PackageSource extends java.lang.Object implements TestSource
Package basedTestSource
.This class stores the package name because
Package
does not implementSerializable
.- Since:
- 1.0
- See Also:
PackageSelector
, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
static PackageSource
from(java.lang.Package javaPackage)
Create a newPackageSource
using the supplied JavaPackage
.static PackageSource
from(java.lang.String packageName)
Create a newPackageSource
using the suppliedpackageName
.java.lang.String
getPackageName()
Get the package name of this test source.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
from
public static PackageSource from(java.lang.Package javaPackage)
Create a newPackageSource
using the supplied JavaPackage
.- Parameters:
javaPackage
- the Java package; must not benull
-
from
public static PackageSource from(java.lang.String packageName)
Create a newPackageSource
using the suppliedpackageName
.- Parameters:
packageName
- the package name; must not benull
or blank
-
getPackageName
public final java.lang.String getPackageName()
Get the package name of this test source.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-