Skip to content

Commit db325b5

Browse files
committed
style: move fields to top
1 parent a38ccd7 commit db325b5

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

src/main/java/com/github/packageurl/PackageURL.java

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,52 @@ public final class PackageURL implements Serializable {
6060

6161
private static final char PERCENT_CHAR = '%';
6262

63+
/**
64+
* The PackageURL scheme constant
65+
*/
66+
public static final String SCHEME = "pkg";
67+
68+
/**
69+
* The PackageURL scheme ({@code "pkg"}) constant followed by a colon ({@code ':'}).
70+
*/
71+
private static final String SCHEME_PART = SCHEME + ':';
72+
73+
/**
74+
* The package "type" or package "protocol" such as maven, npm, nuget, gem, pypi, etc.
75+
* Required.
76+
*/
77+
private String type;
78+
79+
/**
80+
* The name prefix such as a Maven groupid, a Docker image owner, a GitHub user or organization.
81+
* Optional and type-specific.
82+
*/
83+
private @Nullable String namespace;
84+
85+
/**
86+
* The name of the package.
87+
* Required.
88+
*/
89+
private String name;
90+
91+
/**
92+
* The version of the package.
93+
* Optional.
94+
*/
95+
private @Nullable String version;
96+
97+
/**
98+
* Extra qualifying data for a package such as an OS, architecture, a distro, etc.
99+
* Optional and type-specific.
100+
*/
101+
private @Nullable Map<String, String> qualifiers;
102+
103+
/**
104+
* Extra subpath within a package, relative to the package root.
105+
* Optional.
106+
*/
107+
private @Nullable String subpath;
108+
63109
/**
64110
* Constructs a new PackageURL object by parsing the specified string.
65111
*
@@ -141,52 +187,6 @@ public PackageURL(
141187
this(type, namespace, name, version, (qualifiers != null) ? new TreeMap<>(qualifiers) : null, subpath);
142188
}
143189

144-
/**
145-
* The PackageURL scheme constant
146-
*/
147-
public static final String SCHEME = "pkg";
148-
149-
/**
150-
* The PackageURL scheme ({@code "pkg"}) constant followed by a colon ({@code ':'}).
151-
*/
152-
private static final String SCHEME_PART = SCHEME + ':';
153-
154-
/**
155-
* The package "type" or package "protocol" such as maven, npm, nuget, gem, pypi, etc.
156-
* Required.
157-
*/
158-
private String type;
159-
160-
/**
161-
* The name prefix such as a Maven groupid, a Docker image owner, a GitHub user or organization.
162-
* Optional and type-specific.
163-
*/
164-
private @Nullable String namespace;
165-
166-
/**
167-
* The name of the package.
168-
* Required.
169-
*/
170-
private String name;
171-
172-
/**
173-
* The version of the package.
174-
* Optional.
175-
*/
176-
private @Nullable String version;
177-
178-
/**
179-
* Extra qualifying data for a package such as an OS, architecture, a distro, etc.
180-
* Optional and type-specific.
181-
*/
182-
private @Nullable Map<String, String> qualifiers;
183-
184-
/**
185-
* Extra subpath within a package, relative to the package root.
186-
* Optional.
187-
*/
188-
private @Nullable String subpath;
189-
190190
/**
191191
* Converts this {@link PackageURL} to a {@link PackageURLBuilder}.
192192
*

0 commit comments

Comments
 (0)