diff options
Diffstat (limited to 'bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java')
-rw-r--r-- | bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java b/bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java index c19320b8e98..7b665d67931 100644 --- a/bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java +++ b/bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java @@ -3,12 +3,16 @@ package com.yahoo.container.plugin.classanalysis; import java.util.Optional; /** - * The package + * 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; } |