From 55f3a02909957f97c2496ef25135857bf27cdd36 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 12 Jan 2024 00:53:27 +0100 Subject: [PATCH] [review] Split off POJOs modelling XML tags into its own package --- .../lombok/eclipse/dependencies/UniqueQueue.java | 2 +- .../lombok/eclipse/dependencies/UpdateSite.java | 6 ++++++ .../eclipse/dependencies/{ => model}/Child.java | 4 ++-- .../eclipse/dependencies/{ => model}/Provided.java | 8 ++++---- .../eclipse/dependencies/{ => model}/Repository.java | 6 +++--- .../eclipse/dependencies/{ => model}/Required.java | 12 ++++++------ .../eclipse/dependencies/{ => model}/Unit.java | 10 +++++----- 7 files changed, 27 insertions(+), 21 deletions(-) rename src/support/lombok/eclipse/dependencies/{ => model}/Child.java (55%) rename src/support/lombok/eclipse/dependencies/{ => model}/Provided.java (51%) rename src/support/lombok/eclipse/dependencies/{ => model}/Repository.java (77%) rename src/support/lombok/eclipse/dependencies/{ => model}/Required.java (54%) rename src/support/lombok/eclipse/dependencies/{ => model}/Unit.java (74%) diff --git a/src/support/lombok/eclipse/dependencies/UniqueQueue.java b/src/support/lombok/eclipse/dependencies/UniqueQueue.java index 7ec4a38c52..6a97612e39 100644 --- a/src/support/lombok/eclipse/dependencies/UniqueQueue.java +++ b/src/support/lombok/eclipse/dependencies/UniqueQueue.java @@ -5,7 +5,7 @@ import java.util.Set; /** - * A incomplete implementation of a queue that maintains a history of all queued items and ensures unique elements. + * An incomplete implementation of a queue that maintains a history of all queued items and ensures unique elements. * Elements cannot be added to the queue if they already exist in the history. */ public class UniqueQueue extends ArrayDeque { diff --git a/src/support/lombok/eclipse/dependencies/UpdateSite.java b/src/support/lombok/eclipse/dependencies/UpdateSite.java index 93da4120e0..c33793615c 100644 --- a/src/support/lombok/eclipse/dependencies/UpdateSite.java +++ b/src/support/lombok/eclipse/dependencies/UpdateSite.java @@ -24,6 +24,12 @@ import org.xml.sax.InputSource; +import lombok.eclipse.dependencies.model.Child; +import lombok.eclipse.dependencies.model.Provided; +import lombok.eclipse.dependencies.model.Repository; +import lombok.eclipse.dependencies.model.Required; +import lombok.eclipse.dependencies.model.Unit; + public class UpdateSite { private static final String OS_NAME = System.getProperty("os.name").toLowerCase(); private static final String OSGI_OS = OS_NAME.contains("windows") ? "windows" : OS_NAME.contains("mac") ? "mac" : "linux"; diff --git a/src/support/lombok/eclipse/dependencies/Child.java b/src/support/lombok/eclipse/dependencies/model/Child.java similarity index 55% rename from src/support/lombok/eclipse/dependencies/Child.java rename to src/support/lombok/eclipse/dependencies/model/Child.java index 06b93793cc..818645e276 100644 --- a/src/support/lombok/eclipse/dependencies/Child.java +++ b/src/support/lombok/eclipse/dependencies/model/Child.java @@ -1,8 +1,8 @@ -package lombok.eclipse.dependencies; +package lombok.eclipse.dependencies.model; import javax.xml.bind.annotation.XmlAttribute; public class Child { @XmlAttribute - String location; + public String location; } \ No newline at end of file diff --git a/src/support/lombok/eclipse/dependencies/Provided.java b/src/support/lombok/eclipse/dependencies/model/Provided.java similarity index 51% rename from src/support/lombok/eclipse/dependencies/Provided.java rename to src/support/lombok/eclipse/dependencies/model/Provided.java index 6ca7d6f348..b531d3e105 100644 --- a/src/support/lombok/eclipse/dependencies/Provided.java +++ b/src/support/lombok/eclipse/dependencies/model/Provided.java @@ -1,12 +1,12 @@ -package lombok.eclipse.dependencies; +package lombok.eclipse.dependencies.model; import javax.xml.bind.annotation.XmlAttribute; public class Provided { @XmlAttribute - String namespace; + public String namespace; @XmlAttribute - String name; + public String name; @XmlAttribute - String version; + public String version; } diff --git a/src/support/lombok/eclipse/dependencies/Repository.java b/src/support/lombok/eclipse/dependencies/model/Repository.java similarity index 77% rename from src/support/lombok/eclipse/dependencies/Repository.java rename to src/support/lombok/eclipse/dependencies/model/Repository.java index 8423d7eef0..1d81bf8c92 100644 --- a/src/support/lombok/eclipse/dependencies/Repository.java +++ b/src/support/lombok/eclipse/dependencies/model/Repository.java @@ -1,4 +1,4 @@ -package lombok.eclipse.dependencies; +package lombok.eclipse.dependencies.model; import java.util.List; @@ -10,9 +10,9 @@ public class Repository { @XmlElementWrapper(name = "children") @XmlElement(name="child") - List children; + public List children; @XmlElementWrapper(name = "units") @XmlElement(name="unit") - List units; + public List units; } \ No newline at end of file diff --git a/src/support/lombok/eclipse/dependencies/Required.java b/src/support/lombok/eclipse/dependencies/model/Required.java similarity index 54% rename from src/support/lombok/eclipse/dependencies/Required.java rename to src/support/lombok/eclipse/dependencies/model/Required.java index 5f1f895d0a..36fbe46e3f 100644 --- a/src/support/lombok/eclipse/dependencies/Required.java +++ b/src/support/lombok/eclipse/dependencies/model/Required.java @@ -1,17 +1,17 @@ -package lombok.eclipse.dependencies; +package lombok.eclipse.dependencies.model; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; public class Required { @XmlAttribute - String namespace; + public String namespace; @XmlAttribute - String name; + public String name; @XmlAttribute - String range; + public String range; @XmlAttribute - boolean optional; + public boolean optional; @XmlElement - String filter; + public String filter; } diff --git a/src/support/lombok/eclipse/dependencies/Unit.java b/src/support/lombok/eclipse/dependencies/model/Unit.java similarity index 74% rename from src/support/lombok/eclipse/dependencies/Unit.java rename to src/support/lombok/eclipse/dependencies/model/Unit.java index 51827cf059..82d7809e83 100644 --- a/src/support/lombok/eclipse/dependencies/Unit.java +++ b/src/support/lombok/eclipse/dependencies/model/Unit.java @@ -1,4 +1,4 @@ -package lombok.eclipse.dependencies; +package lombok.eclipse.dependencies.model; import java.util.List; @@ -8,17 +8,17 @@ public class Unit { @XmlAttribute - String id; + public String id; @XmlAttribute - String version; + public String version; @XmlElementWrapper(name = "provides") @XmlElement(name="provided") - List provides; + public List provides; @XmlElementWrapper(name = "requires") @XmlElement(name="required") - List requires; + public List requires; @Override public String toString() {