src/share/classes/javax/lang/model/element/TypeElement.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * 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

@@ -103,10 +103,23 @@
      * @see Elements#getBinaryName
      * @jls3 6.7 Fully Qualified Names and Canonical Names
      */
     Name getQualifiedName();
 
+
+    /**
+     * Returns the simple name of this type element.
+     * 
+     * For an anonymous class, an empty name is returned.
+     *
+     * @return the simple name of this class or interface,
+     * an empty name for an anonymous class
+     *
+     */
+    @Override
+    Name getSimpleName();
+
     /**
      * Returns the direct superclass of this type element.
      * If this type element represents an interface or the class
      * {@code java.lang.Object}, then a {@link NoType}
      * with kind {@link TypeKind#NONE NONE} is returned.

@@ -130,6 +143,18 @@
      *
      * @return the formal type parameters, or an empty list
      * if there are none
      */
     List<? extends TypeParameterElement> getTypeParameters();
+
+
+    /**
+     * Returns the package of a top-level type and the immediately
+     * lexically enclosing element for a {@linkplain
+     * NestingKind#isNested nested} type.
+     *
+     * @return the package of a top-level type and the immediately
+     * lexically enclosing element for a nested type
+     */
+    @Override
+    Element getEnclosingElement();
 }