java.lang.Object
org.eclipse.core.runtime.PlatformObject
Alle implementierten Schnittstellen:
IJavaElement, IMember, IParent, ISourceManipulation, ISourceReference, org.eclipse.core.runtime.IAdaptable
Bekannte direkte Unterklassen:
Initializer, NamedMember

public abstract class Member extends SourceRefElement implements IMember
Siehe auch:
  • Konstruktordetails

  • Methodendetails

    • areSimilarMethods

      protected static boolean areSimilarMethods(String name1, String[] params1, String name2, String[] params2, String[] simpleNames1)
    • convertConstant

      protected static Object convertConstant(Constant constant)
      Converts a field constant from the compiler's representation to the Java Model constant representation (Number or String).
    • findMethods

      public static IMethod[] findMethods(IMethod method, IMethod[] methods)
    • getCategories

      public String[] getCategories() throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: IMember
      Returns the categories defined by this member's Javadoc. A category is the identifier following the tag @category in the member's Javadoc. Returns an empty array if no category is defined in this member's Javadoc.
      Angegeben von:
      getCategories in Schnittstelle IMember
      Gibt zurück:
      the categories defined by this member's doc
      Löst aus:
      JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource.
    • getClassFile

      public IClassFile getClassFile()
      Beschreibung aus Schnittstelle kopiert: IMember
      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). This is a handle-only method.
      Angegeben von:
      getClassFile in Schnittstelle IMember
      Setzt außer Kraft:
      getClassFile in Klasse JavaElement
      Gibt zurück:
      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)
      Siehe auch:
    • getDeclaringType

      public IType getDeclaringType()
      Beschreibung aus Schnittstelle kopiert: IMember
      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). This is a handle-only method.
      Angegeben von:
      getDeclaringType in Schnittstelle IMember
      Gibt zurück:
      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)
      Siehe auch:
    • getFlags

      public int getFlags() throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: IMember
      Returns the modifier flags for this member. The flags can be examined using class Flags.

      For binary members, flags from the class file as well as derived flags Flags.AccAnnotationDefault and Flags.AccDefaultMethod are included.

      For source members, 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. Source flags include Flags.AccAnnotationDefault as well.

      Angegeben von:
      getFlags in Schnittstelle IMember
      Gibt zurück:
      the modifier flags for this member
      Löst aus:
      JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource.
      Siehe auch:
    • getHandleFromMemento

      public IJavaElement getHandleFromMemento(String token, MementoTokenizer memento, WorkingCopyOwner workingCopyOwner)
      Setzt außer Kraft:
      getHandleFromMemento in Klasse SourceRefElement
    • getHandleMementoDelimiter

      protected char getHandleMementoDelimiter()
      Beschreibung aus Klasse kopiert: JavaElement
      Returns the char that marks the start of this handles contribution to a memento.
      Angegeben von:
      getHandleMementoDelimiter in Klasse JavaElement
      Siehe auch:
    • getOuterMostLocalContext

      public Member getOuterMostLocalContext()
    • getJavadocRange

      public ISourceRange getJavadocRange() throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: IMember
      Returns the Javadoc range if this element is from source or if this element is a binary element with an attached source, null otherwise.

      If 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.

      Angegeben von:
      getJavadocRange in Schnittstelle IMember
      Gibt zurück:
      a source range corresponding to the javadoc source or null if no source is available, this element has no javadoc comment or this element's openable is not consistent
      Löst aus:
      JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource.
      Siehe auch:
    • getNameRange

      public ISourceRange getNameRange() throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: ISourceReference
      Returns the name range associated with this element.

      If 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.

      Angegeben von:
      getNameRange in Schnittstelle ISourceReference
      Gibt zurück:
      the name range associated with this element, or null if not available
      Löst aus:
      JavaModelException
      Siehe auch:
    • getType

      public IType getType(String typeName, int count)
      Beschreibung aus Schnittstelle kopiert: IMember
      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.
      Angegeben von:
      getType in Schnittstelle IMember
      Parameter:
      typeName - the given simple name
      count - the specified position
      Gibt zurück:
      the type with the given name and/or with the specified position relative to the order they are defined in the source
      Siehe auch:
    • getTypeRoot

      public ITypeRoot getTypeRoot()
      Beschreibung aus Schnittstelle kopiert: IMember
      Returns the Java type root in which this member is declared. This is a handle-only method.
      Angegeben von:
      getTypeRoot in Schnittstelle IMember
      Gibt zurück:
      the Java type root in which this member is declared.
      Siehe auch:
    • isBinary

      public boolean isBinary()
      Beschreibung aus Schnittstelle kopiert: IMember
      Returns whether this member is from a class file. This is a handle-only method.
      Angegeben von:
      isBinary in Schnittstelle IMember
      Gibt zurück:
      true if from a class file, and false if from a compilation unit
      Siehe auch:
    • isMainMethod

      protected boolean isMainMethod(IMethod method) throws JavaModelException
      Löst aus:
      JavaModelException
    • isReadOnly

      public boolean isReadOnly()
      Beschreibung aus Schnittstelle kopiert: IJavaElement
      Returns whether this Java element is read-only. An element is read-only if its structure cannot be modified by the java model.

      Note 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.

      Angegeben von:
      isReadOnly in Schnittstelle IJavaElement
      Setzt außer Kraft:
      isReadOnly in Klasse JavaElement
      Gibt zurück:
      true if this element is read-only
      Siehe auch:
    • readableName

      public String readableName()
      Setzt außer Kraft:
      readableName in Klasse JavaElement