6884227: Clarify ordering requirements of javax.lang.model.TypeElement.getEnclosedElements
Reviewed-by: ahe
--- a/langtools/src/share/classes/javax/lang/model/element/TypeElement.java Fri Sep 18 08:48:50 2009 -0700
+++ b/langtools/src/share/classes/javax/lang/model/element/TypeElement.java Mon Sep 21 21:08:11 2009 -0700
@@ -60,6 +60,22 @@
* @since 1.6
*/
public interface TypeElement extends Element, Parameterizable, QualifiedNameable {
+ /**
+ * {@inheritDoc}
+ *
+ * <p> Note that as a particular instance of the {@linkplain
+ * javax.lang.model.element general accuracy requirements} and the
+ * ordering behavior required of this interface, the list of
+ * enclosed elements will be returned in the natural order for the
+ * originating source of information about the type. For example,
+ * if the information about the type is originating from a source
+ * file, the elements will be returned in source code order.
+ * (However, in that case the the ordering of synthesized
+ * elements, such as a default constructor, is not specified.)
+ *
+ * @return the enclosed elements in proper order, or an empty list if none
+ */
+ List<? extends Element> getEnclosedElements();
/**
* Returns the <i>nesting kind</i> of this type element.