# HG changeset patch # User darcy # Date 1253592491 25200 # Node ID fe8cc7e3a505763316e148d34d04a6a258a77fca # Parent dee59ffb538dfb634283b47f323ef560ec3b7840 6884227: Clarify ordering requirements of javax.lang.model.TypeElement.getEnclosedElements Reviewed-by: ahe diff -r dee59ffb538d -r fe8cc7e3a505 langtools/src/share/classes/javax/lang/model/element/TypeElement.java --- 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} + * + *
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 nesting kind of this type element.