These utilities are intended solely for usage within the JUnit framework itself. Any usage by external parties is not supported. Use at your own risk!
| Modifier and Type | Field and Description |
|---|---|
| public static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Optional | Returns: anOptional containing the attribute value; never
null but potentially emptythe type to get the package attribute for type, Function<Package, String> a function that computes the package attribute value
(e.g., function)Package::getImplementationTitle); never nullGet the package attribute for the supplied |
| public static Optional | Returns: anOptional containing the attribute value; never
null but potentially emptythe type to get the attribute for type, String the attribute name as a string name)Get the value of the specified attribute name, specified as a string,
or an empty |
| public static Optional | getModuleOrImplementationVersion(Class<?> type)
Get the module or implementation version for the supplied |
| DEFAULT_PACKAGE_NAME | back to summary |
|---|---|
| public static final String DEFAULT_PACKAGE_NAME | |
| PackageUtils | back to summary |
|---|---|
| private PackageUtils() | |
| getAttribute | back to summary |
|---|---|
| public static Optional Get the package attribute for the supplied This method only returns a non-empty
| |
| getAttribute | back to summary |
|---|---|
| public static Optional Get the value of the specified attribute name, specified as a string,
or an empty This method also returns an empty
| |
| getModuleOrImplementationVersion | back to summary |
|---|---|
| public static Optional Get the module or implementation version for the supplied The former is only available if the type is part of a versioned module
on the module path; the latter only if the type is part of a JAR file with
a manifest that contains an | |