### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: dom/org/eclipse/jdt/core/dom/TypeBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java,v retrieving revision 1.109 diff -u -r1.109 TypeBinding.java --- dom/org/eclipse/jdt/core/dom/TypeBinding.java 20 Oct 2005 13:26:46 -0000 1.109 +++ dom/org/eclipse/jdt/core/dom/TypeBinding.java 18 Dec 2005 00:37:07 -0000 @@ -140,6 +140,17 @@ } /* + * @see ITypeBinding#getComponentType() + */ + public ITypeBinding getComponentType() { + if (!this.isArray()) { + return null; + } + ArrayBinding arrayBinding = (ArrayBinding) binding; + return resolver.getTypeBinding(arrayBinding.elementsType()); + } + + /* * @see ITypeBinding#getDeclaredFields() */ public IVariableBinding[] getDeclaredFields() { 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.51 diff -u -r1.51 ITypeBinding.java --- dom/org/eclipse/jdt/core/dom/ITypeBinding.java 14 Jun 2005 15:41:19 -0000 1.51 +++ dom/org/eclipse/jdt/core/dom/ITypeBinding.java 18 Dec 2005 00:37:06 -0000 @@ -75,6 +75,18 @@ public ITypeBinding getBound(); /** + * Returns the component type of this array type. The component type + * may be another array type. + * Returns the binding representing the component type of this array type, + * or null if this is not an array type binding. The component + * type of an array may be another array type. + * + * @return the component type binding, or null if this is + * not an array type + */ + public ITypeBinding getComponentType(); + + /** * Returns a list of bindings representing all the fields declared * as members of this class, interface, or enum type. These include public, * protected, default (package-private) access, and private fields declared