blob: 7b665d6793111406b63e625ae0e09fd042298a38 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package com.yahoo.container.plugin.classanalysis;
import java.util.Optional;
/**
* Info about a Java package deduced from class analysis.
*
* @author gjoranv
*/
record PackageInfo(String name, Optional<ExportPackageAnnotation> exportPackage, boolean isPublicApi) {
/**
* Returns this if it has an ExportPackage annotation, otherwise returns the other.
* Used to combine objects, where this should take precedence over the other.
*/
PackageInfo hasExportPackageOrElse(PackageInfo other) {
return exportPackage().isPresent() ? this : other;
}
}
|