--- old/src/share/classes/javax/lang/model/element/PackageElement.java 2012-01-18 16:39:29.000000000 -0800 +++ new/src/share/classes/javax/lang/model/element/PackageElement.java 2012-01-18 16:39:29.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,8 @@ package javax.lang.model.element; +import java.util.List; + /** * Represents a package program element. Provides access to information * about the package and its members. @@ -49,7 +51,7 @@ /** * Returns the simple name of this package. For an unnamed - * package, an empty name is returned + * package, an empty name is returned. * * @return the simple name of this package or an empty name if * this is an unnamed package @@ -58,6 +60,18 @@ Name getSimpleName(); /** + * Returns the {@linkplain NestingKind#TOP_LEVEL top-level} + * classes and interfaces within this package. Note that + * subpackages are not considered to be enclosed by a + * package. + * + * @return the top-level classes and interfaces within this + * package + */ + @Override + List getEnclosedElements(); + + /** * Returns {@code true} is this is an unnamed package and {@code * false} otherwise. *