Skip to content

Commit

Permalink
[review] Split off POJOs modelling XML tags into its own package
Browse files Browse the repository at this point in the history
  • Loading branch information
rzwitserloot committed Jan 11, 2024
1 parent 9caa9cc commit 55f3a02
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/support/lombok/eclipse/dependencies/UniqueQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> extends ArrayDeque<T> {
Expand Down
6 changes: 6 additions & 0 deletions src/support/lombok/eclipse/dependencies/UpdateSite.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package lombok.eclipse.dependencies;
package lombok.eclipse.dependencies.model;

import java.util.List;

Expand All @@ -10,9 +10,9 @@
public class Repository {
@XmlElementWrapper(name = "children")
@XmlElement(name="child")
List<Child> children;
public List<Child> children;

@XmlElementWrapper(name = "units")
@XmlElement(name="unit")
List<Unit> units;
public List<Unit> units;
}
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package lombok.eclipse.dependencies;
package lombok.eclipse.dependencies.model;

import java.util.List;

Expand All @@ -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<Provided> provides;
public List<Provided> provides;

@XmlElementWrapper(name = "requires")
@XmlElement(name="required")
List<Required> requires;
public List<Required> requires;

@Override
public String toString() {
Expand Down

0 comments on commit 55f3a02

Please sign in to comment.