aboutsummaryrefslogtreecommitdiffstats
path: root/bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java
diff options
context:
space:
mode:
authorgjoranv <gv@yahooinc.com>2023-06-08 11:13:39 +0200
committergjoranv <gv@yahooinc.com>2023-06-08 14:20:50 +0200
commitfb3eb76f49fa9e3f77de756949f56485af0b6050 (patch)
tree4d6f6f8db53df70cc2005ff305d4f45f16973e01 /bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/PackageInfo.java
parenteae78b80d5d94e4cff9eb112637be20eb998712d (diff)
Fix class comment and add comment for method.
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.java6
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;
}