diff --git a/core/src/main/java/org/jboss/jandex/ClassInfo.java b/core/src/main/java/org/jboss/jandex/ClassInfo.java index ac64cfa0..070e5064 100644 --- a/core/src/main/java/org/jboss/jandex/ClassInfo.java +++ b/core/src/main/java/org/jboss/jandex/ClassInfo.java @@ -701,8 +701,10 @@ public final List classAnnotationsWithRepeatable(DotName nam * and static initializer blocks which have the special names of {@code } * and {@code }, respectively. It does not, however, include inherited methods. * These must be discovered by traversing the class hierarchy. - *

* This list may be empty, but is never {@code null}. + *

+ * Note that the result doesn't have any guaranteed order. If you need + * declaration order, use {@link #unsortedMethods()}. * * @return the list of methods declared in this class */ @@ -832,7 +834,10 @@ public final FieldInfo field(String name) { /** * Returns a list of all available fields. Only fields declared in this class are available. * Locating inherited fields requires traversing the class hierarchy. This list may be - * empty, but never null. + * empty, but is never {@code null}. + *

+ * Note that the result doesn't have any guaranteed order. If you need + * declaration order, use {@link #unsortedFields()}. * * @return a list of fields */ @@ -885,9 +890,12 @@ public final RecordComponentInfo recordComponent(String name) { /** * Returns a list of all record components declared by this class. - * This list may be empty, but never {@code null}. + * This list may be empty, but is never {@code null}. *

* If this class is not a record, returns an empty list. + *

+ * Note that the result doesn't have any guaranteed order. If you need + * declaration order, use {@link #unsortedRecordComponents()}. * * @return immutable list of record components */