changeset 432:789ee1acf107

6884227: Clarify ordering requirements of javax.lang.model.TypeElement.getEnclosedElements Reviewed-by: ahe
author darcy
date Mon, 21 Sep 2009 21:08:11 -0700
parents 5dd400fd62d9
children 9596dff46093 e992e602788e
files src/share/classes/javax/lang/model/element/TypeElement.java
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/lang/model/element/TypeElement.java	Fri Sep 18 08:48:50 2009 -0700
+++ b/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.