File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -292,6 +292,26 @@ override: true
292292# OVERRIDE is set to true.
293293` ` `
294294
295+ # ### @Priority
296+
297+ Used to set the position / order of a node instead of
298+ using the position of the static member in the class.
299+
300+ Nodes have a priority of `Integer.MAX_VALUE` by default.
301+
302+ ` ` ` java
303+ @Priority(2)
304+ public static int EXAMPLE = 3;
305+
306+ @Priority(1)
307+ public static class TEST { }
308+ ` ` `
309+
310+ ` ` ` yaml
311+ test: {}
312+ example: 3
313+ ` ` `
314+
295315# ### @Header & @Footer
296316
297317- @Header is used to add a header comment to the top of a config document.
@@ -413,7 +433,7 @@ For more information about resolvers, please refer to the internal javadocs.
413433# ## Limitations
414434
415435Due to the way that class members are retrieved in java, fields are always above
416- subclasses meaning the following is not possible.
436+ subclasses meaning the following is not possible without using @Priority .
417437
418438<details>
419439<summary>Expand</summary>
You can’t perform that action at this time.
0 commit comments