Skip to content

Commit 7d8333e

Browse files
committed
docs: complete deprecation documentation for XmlNode
1 parent 62859aa commit 7d8333e

File tree

1 file changed

+82
-5
lines changed
  • api/maven-api-xml/src/main/java/org/apache/maven/api/xml

1 file changed

+82
-5
lines changed

api/maven-api-xml/src/main/java/org/apache/maven/api/xml/XmlNode.java

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,41 +61,76 @@ public interface XmlNode {
6161
@Deprecated(since = "4.0.0", forRemoval = true)
6262
String CHILDREN_COMBINATION_MODE_ATTRIBUTE = XmlService.CHILDREN_COMBINATION_MODE_ATTRIBUTE;
6363

64+
/**
65+
* @deprecated since 4.0.0.
66+
* Use {@link XmlService#CHILDREN_COMBINATION_MERGE} instead.
67+
*/
6468
@Deprecated(since = "4.0.0", forRemoval = true)
6569
String CHILDREN_COMBINATION_MERGE = XmlService.CHILDREN_COMBINATION_MERGE;
6670

71+
72+
/**
73+
* @deprecated since 4.0.0.
74+
* Use {@link XmlService#CHILDREN_COMBINATION_APPEND} instead.
75+
*/
6776
@Deprecated(since = "4.0.0", forRemoval = true)
6877
String CHILDREN_COMBINATION_APPEND = XmlService.CHILDREN_COMBINATION_APPEND;
6978

79+
7080
/**
7181
* This default mode for combining children DOMs during merge means that where element names match, the process will
7282
* try to merge the element data, rather than putting the dominant and recessive elements (which share the same
7383
* element name) as siblings in the resulting DOM.
84+
*
85+
* @deprecated since 4.0.0.
86+
* Use {@link XmlService#DEFAULT_CHILDREN_COMBINATION_MODE} instead.
7487
*/
7588
@Deprecated(since = "4.0.0", forRemoval = true)
7689
String DEFAULT_CHILDREN_COMBINATION_MODE = XmlService.DEFAULT_CHILDREN_COMBINATION_MODE;
7790

91+
/**
92+
* @deprecated since 4.0.0.
93+
* Use {@link XmlService#SELF_COMBINATION_MODE_ATTRIBUTE} instead.
94+
*/
7895
@Deprecated(since = "4.0.0", forRemoval = true)
7996
String SELF_COMBINATION_MODE_ATTRIBUTE = XmlService.SELF_COMBINATION_MODE_ATTRIBUTE;
80-
97+
/**
98+
* @deprecated since 4.0.0.
99+
* Use {@link XmlService#SELF_COMBINATION_OVERRIDE} instead.
100+
*/
81101
@Deprecated(since = "4.0.0", forRemoval = true)
82102
String SELF_COMBINATION_OVERRIDE = XmlService.SELF_COMBINATION_OVERRIDE;
83103

104+
/**
105+
* @deprecated since 4.0.0.
106+
* Use {@link XmlService#SELF_COMBINATION_MERGE} instead.
107+
*/
108+
84109
@Deprecated(since = "4.0.0", forRemoval = true)
85110
String SELF_COMBINATION_MERGE = XmlService.SELF_COMBINATION_MERGE;
111+
/**
112+
* @deprecated since 4.0.0.
113+
* Use {@link XmlService#SELF_COMBINATION_REMOVE} instead.
114+
*/
86115

87116
@Deprecated(since = "4.0.0", forRemoval = true)
88117
String SELF_COMBINATION_REMOVE = XmlService.SELF_COMBINATION_REMOVE;
89118

90119
/**
91120
* In case of complex XML structures, combining can be done based on id.
121+
*
122+
* @deprecated since 4.0.0.
123+
* Use {@link XmlService#ID_COMBINATION_MODE_ATTRIBUTE} instead.
92124
*/
93125
@Deprecated(since = "4.0.0", forRemoval = true)
94126
String ID_COMBINATION_MODE_ATTRIBUTE = XmlService.ID_COMBINATION_MODE_ATTRIBUTE;
95127

96128
/**
97129
* In case of complex XML structures, combining can be done based on keys.
98130
* This is a comma separated list of attribute names.
131+
*
132+
* @deprecated since 4.0.0.
133+
* Use {@link XmlService#KEYS_COMBINATION_MODE_ATTRIBUTE} instead.
99134
*/
100135
@Deprecated(since = "4.0.0", forRemoval = true)
101136
String KEYS_COMBINATION_MODE_ATTRIBUTE = XmlService.KEYS_COMBINATION_MODE_ATTRIBUTE;
@@ -105,6 +140,9 @@ public interface XmlNode {
105140
* try to merge the element attributes and values, rather than overriding the recessive element completely with the
106141
* dominant one. This means that wherever the dominant element doesn't provide the value or a particular attribute,
107142
* that value or attribute will be set from the recessive DOM node.
143+
*
144+
* @deprecated since 4.0.0.
145+
* Use {@link XmlService#DEFAULT_SELF_COMBINATION_MODE} instead.
108146
*/
109147
@Deprecated(since = "4.0.0", forRemoval = true)
110148
String DEFAULT_SELF_COMBINATION_MODE = XmlService.DEFAULT_SELF_COMBINATION_MODE;
@@ -186,76 +224,114 @@ public interface XmlNode {
186224
Object inputLocation();
187225

188226
// Deprecated methods that delegate to new ones
227+
/**
228+
* @deprecated since 4.0.0.
229+
* Use {@link #name()} instead.
230+
*/
189231
@Deprecated(since = "4.0.0", forRemoval = true)
190232
@Nonnull
191233
default String getName() {
192234
return name();
193235
}
194236

237+
/**
238+
* @deprecated since 4.0.0.
239+
* Use {@link #namespaceUri()} instead.
240+
*/
195241
@Deprecated(since = "4.0.0", forRemoval = true)
196242
@Nonnull
197243
default String getNamespaceUri() {
198244
return namespaceUri();
199245
}
200246

247+
/**
248+
* @deprecated since 4.0.0.
249+
* Use {@link #prefix()} instead.
250+
*/
201251
@Deprecated(since = "4.0.0", forRemoval = true)
202252
@Nonnull
203253
default String getPrefix() {
204254
return prefix();
205255
}
206-
256+
/**
257+
* @deprecated since 4.0.0.
258+
* Use {@link #value()} instead.
259+
*/
207260
@Deprecated(since = "4.0.0", forRemoval = true)
208261
@Nullable
209262
default String getValue() {
210263
return value();
211264
}
212265

266+
/**
267+
* @deprecated since 4.0.0.
268+
* Use {@link #attributes()} instead.
269+
*/
213270
@Deprecated(since = "4.0.0", forRemoval = true)
214271
@Nonnull
215272
default Map<String, String> getAttributes() {
216273
return attributes();
217274
}
218275

276+
/**
277+
* @deprecated since 4.0.0.
278+
* Use {@link #attribute(String)} instead.
279+
*/
219280
@Deprecated(since = "4.0.0", forRemoval = true)
220281
@Nullable
221282
default String getAttribute(@Nonnull String name) {
222283
return attribute(name);
223284
}
224285

286+
/**
287+
* @deprecated since 4.0.0.
288+
* Use {@link #children()} instead.
289+
*/
225290
@Deprecated(since = "4.0.0", forRemoval = true)
226291
@Nonnull
227292
default List<XmlNode> getChildren() {
228293
return children();
229294
}
230295

296+
/**
297+
* @deprecated since 4.0.0.
298+
* Use {@link #child(String)} instead.
299+
*/
231300
@Deprecated(since = "4.0.0", forRemoval = true)
232301
@Nullable
233302
default XmlNode getChild(String name) {
234303
return child(name);
235304
}
236305

306+
/**
307+
* @deprecated since 4.0.0.
308+
* Use {@link #inputLocation()} instead.
309+
*/
237310
@Deprecated(since = "4.0.0", forRemoval = true)
238311
@Nullable
239312
default Object getInputLocation() {
240313
return inputLocation();
241314
}
242315

243316
/**
244-
* @deprecated use {@link XmlService#merge(XmlNode, XmlNode, Boolean)} instead
317+
* @deprecated since 4.0.0.
318+
* Use {@link XmlService#merge(XmlNode, XmlNode, Boolean)} instead.
245319
*/
246320
@Deprecated(since = "4.0.0", forRemoval = true)
247321
default XmlNode merge(@Nullable XmlNode source) {
248322
return XmlService.merge(this, source);
249323
}
250324

251325
/**
252-
* @deprecated use {@link XmlService#merge(XmlNode, XmlNode, Boolean)} instead
326+
* @deprecated since 4.0.0.
327+
* Use {@link XmlService#merge(XmlNode, XmlNode, Boolean)} instead.
253328
*/
254329
@Deprecated(since = "4.0.0", forRemoval = true)
255330
default XmlNode merge(@Nullable XmlNode source, @Nullable Boolean childMergeOverride) {
256331
return XmlService.merge(this, source, childMergeOverride);
257332
}
258333

334+
259335
/**
260336
* Merge recessive into dominant and return either {@code dominant}
261337
* with merged information or a clone of {@code recessive} if
@@ -265,7 +341,8 @@ default XmlNode merge(@Nullable XmlNode source, @Nullable Boolean childMergeOver
265341
* @param recessive if {@code null}, nothing will happen
266342
* @return the merged node
267343
*
268-
* @deprecated use {@link XmlService#merge(XmlNode, XmlNode, Boolean)} instead
344+
* @deprecated since 4.0.0.
345+
* Use {@link XmlService#merge(XmlNode, XmlNode, Boolean)} instead.
269346
*/
270347
@Deprecated(since = "4.0.0", forRemoval = true)
271348
@Nullable

0 commit comments

Comments
 (0)