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 7e532ec..f1d5d47 100644
--- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IMember.java
+++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IMember.java
@@ -1,15 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
+ * are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
+ * http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
- ******************************************************************************/
+ *******************************************************************************/
package net.sourceforge.phpdt.core;
+
/**
* Common protocol for Java elements that can be members of types.
* This set consists of IType
, IMethod
,
@@ -18,7 +19,7 @@ package net.sourceforge.phpdt.core;
* This interface is not intended to be implemented by clients.
*
null
* if this member is not declared in a class file (for example, a source type).
@@ -27,7 +28,7 @@ public interface IMember extends IJavaElement, ISourceReference, ISourceManipula
* @return 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)
*/
-// IClassFile getClassFile();
+//IClassFile getClassFile();
/**
* Returns the compilation unit in which this member is declared, or null
* if this member is not declared in a compilation unit (for example, a binary type).
@@ -45,10 +46,14 @@ ICompilationUnit getCompilationUnit();
* @return the type in which this member is declared, or null
* if this member is not declared in a type (for example, a top-level type)
*/
-IType getDeclaringType();
+ IType getDeclaringType();
/**
* Returns the modifier flags for this member. The flags can be examined using class
* Flags
.
+ *
+ * Note that only flags as indicated in the source are returned. Thus if an interface
+ * defines a method void myMethod();
the flags don't include the
+ * 'public' flag.
*
* @exception JavaModelException if this element does not exist or if an
* exception occurs while accessing its corresponding resource.
@@ -71,6 +76,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.
*