X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IMember.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IMember.java index 68446bd..8365ab6 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IMember.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IMember.java @@ -10,6 +10,8 @@ *******************************************************************************/ package net.sourceforge.phpdt.core; +import net.sourceforge.phpdt.core.IType; + /** * Common protocol for Java elements that can be members of types. * This set consists of IType, IMethod, @@ -18,7 +20,7 @@ package net.sourceforge.phpdt.core; * This interface is not intended to be implemented by clients. *

*/ -public interface IMember extends IJavaElement , ISourceReference, ISourceManipulation { +public interface IMember extends IJavaElement , ISourceReference, ISourceManipulation, IParent { /** * Returns the class file in which this member is declared, or null * if this member is not declared in a class file (for example, a source type). @@ -75,6 +77,20 @@ int getFlags() throws JavaModelException; */ ISourceRange getNameRange() throws JavaModelException; /** + * Returns the local or anonymous type declared in this source member with the given simple name and/or + * with the specified position relative to the order they are defined in the source. + * The name is empty if it is an anonymous type. + * Numbering starts at 1 (thus the first occurrence is occurrence 1, not occurrence 0). + * This is a handle-only method. The type may or may not exist. + * Throws a RuntimeException if this member is not a source member. + * + * @param name the given simple name + * @param occurrenceCount the specified position + * @return the type with the given name and/or with the specified position relative to the order they are defined in the source + * @since 3.0 + */ +IType getType(String name, int occurrenceCount); +/** * Returns whether this member is from a class file. * This is a handle-only method. *