src/share/classes/javax/lang/model/element/PackageElement.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2009, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2005, 2011, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 46,59 ****
--- 46,78 ----
* @jls3 6.7 Fully Qualified Names and Canonical Names
*/
Name getQualifiedName();
/**
+ * Returns the simple name of this package. For an unnamed
+ * package, an empty name is returned
+ *
+ * @return the simple name of this package or an empty name if
+ * this is an unnamed package
+ */
+ @Override
+ Name getSimpleName();
+
+ /**
* Returns {@code true} is this is an unnamed package and {@code
* false} otherwise.
*
* @return {@code true} is this is an unnamed package and {@code
* false} otherwise
* @jls3 7.4.2 Unnamed Packages
*/
boolean isUnnamed();
+
+ /**
+ * Returns {@code null} since a package is not enclosed by another
+ * element.
+ *
+ * @return {@code null}
+ */
+ @Override
+ Element getEnclosingElement();
}