|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectPlatformObject
org.aspectj.org.eclipse.jdt.internal.core.JavaElement
org.aspectj.org.eclipse.jdt.internal.core.SourceRefElement
org.aspectj.org.eclipse.jdt.internal.core.Member
public abstract class Member
IMember| Field Summary |
|---|
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.SourceRefElement |
|---|
occurrenceCount |
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaElement |
|---|
JEM_ANNOTATION, JEM_CLASSFILE, JEM_COMPILATIONUNIT, JEM_COUNT, JEM_ESCAPE, JEM_FIELD, JEM_IMPORTDECLARATION, JEM_INITIALIZER, JEM_JAVAPROJECT, JEM_LOCALVARIABLE, JEM_METHOD, JEM_PACKAGEDECLARATION, JEM_PACKAGEFRAGMENT, JEM_PACKAGEFRAGMENTROOT, JEM_TYPE, JEM_TYPE_PARAMETER, NO_ELEMENTS, NO_INFO, parent |
| Fields inherited from interface org.aspectj.org.eclipse.jdt.core.IJavaElement |
|---|
ANNOTATION, CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETER |
| Constructor Summary | |
|---|---|
protected |
Member(JavaElement parent)
|
| Method Summary | |
|---|---|
protected static boolean |
areSimilarMethods(java.lang.String name1,
java.lang.String[] params1,
java.lang.String name2,
java.lang.String[] params2,
java.lang.String[] simpleNames1)
|
protected static java.lang.Object |
convertConstant(Constant constant)
Converts a field constant from the compiler's representation to the Java Model constant representation (Number or String). |
static IMethod[] |
findMethods(IMethod method,
IMethod[] methods)
|
java.lang.String[] |
getCategories()
Returns the categories defined by this member's Javadoc. |
IClassFile |
getClassFile()
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). |
IType |
getDeclaringType()
Returns 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). |
int |
getFlags()
Returns the modifier flags for this member. |
IJavaElement |
getHandleFromMemento(java.lang.String token,
MementoTokenizer memento,
WorkingCopyOwner workingCopyOwner)
|
protected char |
getHandleMementoDelimiter()
Returns the char that marks the start of this handles
contribution to a memento. |
ISourceRange |
getJavadocRange()
Returns the Javadoc range if this element is from source or if this element is a binary element with an attached source, null otherwise. |
ISourceRange |
getNameRange()
Returns the name range associated with this element. |
Member |
getOuterMostLocalContext()
|
IType |
getType(java.lang.String typeName,
int count)
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. |
ITypeRoot |
getTypeRoot()
Returns the Java type root in which this member is declared. |
boolean |
isBinary()
Returns whether this member is from a class file. |
protected boolean |
isMainMethod(IMethod method)
|
boolean |
isReadOnly()
Returns whether this Java element is read-only. |
java.lang.String |
readableName()
|
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.SourceRefElement |
|---|
closing, copy, createElementInfo, delete, equals, findNode, generateInfos, getAnnotation, getAnnotations, getCompilationUnit, getCorrespondingResource, getHandleMemento, getHandleUpdatingCountFromMemento, getOccurrenceCount, getOpenableParent, getPath, getSource, getSourceRange, getUnderlyingResource, hasChildren, isStructureKnown, move, rename, resource, toStringName |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IMember |
|---|
getCompilationUnit, getOccurrenceCount |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IJavaElement |
|---|
exists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getElementName, getElementType, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isStructureKnown |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.ISourceReference |
|---|
exists, getSource, getSourceRange |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.ISourceManipulation |
|---|
copy, delete, move, rename |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IParent |
|---|
getChildren, hasChildren |
| Constructor Detail |
|---|
protected Member(JavaElement parent)
| Method Detail |
|---|
protected static boolean areSimilarMethods(java.lang.String name1,
java.lang.String[] params1,
java.lang.String name2,
java.lang.String[] params2,
java.lang.String[] simpleNames1)
protected static java.lang.Object convertConstant(Constant constant)
public static IMethod[] findMethods(IMethod method,
IMethod[] methods)
public java.lang.String[] getCategories()
throws JavaModelException
IMember@category in the member's Javadoc.
Returns an empty array if no category is defined in this member's Javadoc.
getCategories in interface IMemberJavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resource.public IClassFile getClassFile()
IMembernull
if this member is not declared in a class file (for example, a source type).
This is a handle-only method.
getClassFile in interface IMembergetClassFile in class JavaElementnull
if this member is not declared in a class file (for example, a source type)IMemberpublic IType getDeclaringType()
IMembernull
if this member is not declared in a type (for example, a top-level type).
This is a handle-only method.
getDeclaringType in interface IMembernull
if this member is not declared in a type (for example, a top-level type)IMember
public int getFlags()
throws JavaModelException
IMemberFlags.
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.
getFlags in interface IMemberJavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resource.IMember
public IJavaElement getHandleFromMemento(java.lang.String token,
MementoTokenizer memento,
WorkingCopyOwner workingCopyOwner)
getHandleFromMemento in class SourceRefElementprotected char getHandleMementoDelimiter()
JavaElementchar that marks the start of this handles
contribution to a memento.
getHandleMementoDelimiter in class JavaElementJavaElement.getHandleMemento()public Member getOuterMostLocalContext()
public ISourceRange getJavadocRange()
throws JavaModelException
IMemberIf this element is from source, the javadoc range is extracted from the corresponding source.
If this element is from a binary, the javadoc is extracted from the attached source if present.
If this element's openable is not consistent, then null is returned.
getJavadocRange in interface IMembernull
if no source is available, this element has no javadoc comment or
this element's openable is not consistent
JavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resource.IOpenable.isConsistent()
public ISourceRange getNameRange()
throws JavaModelException
ISourceReferenceIf the element is an IMember, it returns
the source range of this member's simple name,
or null if this member does not have a name
(for example, an initializer), or if this member does not have
associated source code (for example, a binary type).
If this element is an IImportDeclaration, the source range
of this import declaration's name, or null if this import
declaration does not have associated source code (for example, a binary type).
The source range for the name includes the trailing '*' if the call to
IImportDeclaration.isOnDemand() returns true.
If this element is an IPackageDeclaration, the source range of
this package declaration's name, or null if this package
declaration does not have associated source code (for example, a binary type).
If this element is an IAnnotation, the source range of
this annotation's name, or null if this annotation does not have
associated source code (for example, in a binary type).
If this element is an ITypeParameter, the source range of this
type parameter's name, or null if this type parameter does not have
associated source code (for example, in a binary type).
If this element is an ITypeRoot or IImportContainer, it
returns null.
getNameRange in interface ISourceReferencenull if
not available
JavaModelExceptionIMember
public IType getType(java.lang.String typeName,
int count)
IMemberRuntimeException if this member is not a source member.
getType in interface IMembertypeName - the given simple namecount - the specified position
IMemberpublic ITypeRoot getTypeRoot()
IMember
getTypeRoot in interface IMemberIMember.getTypeRoot()public boolean isBinary()
IMember
isBinary in interface IMembertrue if from a class file, and false if
from a compilation unitIMember
protected boolean isMainMethod(IMethod method)
throws JavaModelException
JavaModelExceptionpublic boolean isReadOnly()
IJavaElementNote this is different from IResource.isReadOnly(). For example, .jar files are read-only as the java model doesn't know how to add/remove elements in this file, but the underlying IFile can be writable.
This is a handle-only method.
isReadOnly in interface IJavaElementisReadOnly in class JavaElementtrue if this element is read-onlyIJavaElementpublic java.lang.String readableName()
readableName in class JavaElement
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||