### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: dom/org/eclipse/jdt/core/dom/ITypeBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java,v retrieving revision 1.74 diff -u -r1.74 ITypeBinding.java --- dom/org/eclipse/jdt/core/dom/ITypeBinding.java 7 Mar 2009 00:59:01 -0000 1.74 +++ dom/org/eclipse/jdt/core/dom/ITypeBinding.java 14 Mar 2011 05:38:26 -0000 @@ -751,11 +751,14 @@ *

* A local class is any nested class or enum type not declared as a member * of another class or interface. A local class is a subspecies of nested - * type, and mutually exclusive with member types. Note that anonymous - * classes are a subspecies of local classes. + * type, and mutually exclusive with member types. For anonymous + * classes, which are considered a subspecies of local classes, this method + * returns true. *

*

- * Also note that interfaces and annotation types cannot be local. + * Note: This deviates from JLS3 14.3, which states that anonymous types are + * not local types since they do not have a name. Also note that interfaces + * and annotation types cannot be local. *

* * @return true if this type binding is for a local class or Index: model/org/eclipse/jdt/core/IType.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IType.java,v retrieving revision 1.71 diff -u -r1.71 IType.java --- model/org/eclipse/jdt/core/IType.java 17 Dec 2010 14:10:57 -0000 1.71 +++ model/org/eclipse/jdt/core/IType.java 14 Mar 2011 05:38:26 -0000 @@ -906,11 +906,17 @@ boolean isAnnotation() throws JavaModelException; /** - * Returns whether this type represents a local type. + * Returns whether this type represents a local type. For an anonymous type, + * this method returns true. + *

+ * Note: This deviates from JLS3 14.3, which states that anonymous types are + * not local types since they do not have a name. + *

* * @exception JavaModelException if this element does not exist or if an * exception occurs while accessing its corresponding resource. * @return true if this type represents a local type, false otherwise + * @see org.eclipse.jdt.core.dom.ITypeBinding#isLocal() * @since 2.0 */ boolean isLocal() throws JavaModelException;