Klasse BinaryMember

Alle implementierten Schnittstellen:
IJavaElement, IMember, IParent, ISourceManipulation, ISourceReference, org.eclipse.core.runtime.IAdaptable
Bekannte direkte Unterklassen:
BinaryMethod, BinaryModule, BinaryType, ResolvedBinaryField

public abstract class BinaryMember extends NamedMember
Common functionality for Binary member handles.
  • Konstruktordetails

  • Methodendetails

    • copy

      public void copy(IJavaElement container, IJavaElement sibling, String rename, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: ISourceManipulation
      Copies this element to the given container.
      Angegeben von:
      copy in Schnittstelle ISourceManipulation
      Setzt außer Kraft:
      copy in Klasse SourceRefElement
      Parameter:
      container - the container
      sibling - the sibling element before which the copy should be inserted, or null if the copy should be inserted as the last child of the container
      rename - the new name for the element, or null if the copy retains the name of this element
      force - true if any existing child in the container with the target name should be replaced, and false to throw an exception in the event of a name collision
      monitor - a progress monitor
      Löst aus:
      JavaModelException - if this element could not be copied. Reasons include:
      • This Java element, container element, or sibling does not exist (ELEMENT_DOES_NOT_EXIST)
      • A CoreException occurred while updating an underlying resource
      • The container is of an incompatible type (INVALID_DESTINATION)
      • The sibling is not a child of the given container (INVALID_SIBLING)
      • The new name is invalid (INVALID_NAME)
      • A child in the container already exists with the same name (NAME_COLLISION) and replace has been specified as false
      • The container or this element is read-only (READ_ONLY)
      Siehe auch:
    • getAnnotations

      protected IAnnotation[] getAnnotations(IBinaryAnnotation[] binaryAnnotations, long tagBits)
    • getStandardAnnotations

      protected IAnnotation[] getStandardAnnotations(long tagBits)
    • 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
      Setzt außer Kraft:
      getCategories in Klasse Member
      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.
    • getKey

      public String getKey()
    • getKey

      public abstract String getKey(boolean forceOpen) throws JavaModelException
      Löst aus:
      JavaModelException
      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
      Setzt außer Kraft:
      getNameRange in Klasse Member
      Gibt zurück:
      the name range associated with this element, or null if not available
      Löst aus:
      JavaModelException
      Siehe auch:
    • getSourceRange

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

      For class files, this returns the range of the entire compilation unit associated with the class file (if there is one).

      If this element has no associated source code, either null is returned, or a source range with a -1 offset and a 0 length. SourceRange.isAvailable(ISourceRange) can be used to detect that case.

      Angegeben von:
      getSourceRange in Schnittstelle ISourceReference
      Setzt außer Kraft:
      getSourceRange in Klasse SourceRefElement
      Gibt zurück:
      the source range, or either null or [-1, 0] if this element has no associated source code
      Löst aus:
      JavaModelException - if an exception occurs while accessing its corresponding resource
      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
      Setzt außer Kraft:
      isBinary in Klasse Member
      Gibt zurück:
      true if from a class file, and false if from a compilation unit
      Siehe auch:
    • isStructureKnown

      public boolean isStructureKnown() throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: IJavaElement
      Returns whether the structure of this element is known. For example, for a compilation unit that has syntax errors, false is returned. If the structure of an element is unknown, navigations will return reasonable defaults. For example, getChildren for a compilation unit with syntax errors will return a collection of the children that could be parsed.

      Note: This does not imply anything about consistency with the underlying resource/buffer contents.

      Angegeben von:
      isStructureKnown in Schnittstelle IJavaElement
      Setzt außer Kraft:
      isStructureKnown in Klasse SourceRefElement
      Gibt zurück:
      true if the structure of this element is known
      Löst aus:
      JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource
      Siehe auch:
    • move

      public void move(IJavaElement container, IJavaElement sibling, String rename, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: ISourceManipulation
      Moves this element to the given container.
      Angegeben von:
      move in Schnittstelle ISourceManipulation
      Setzt außer Kraft:
      move in Klasse SourceRefElement
      Parameter:
      container - the container
      sibling - the sibling element before which the element should be inserted, or null if the element should be inserted as the last child of the container
      rename - the new name for the element, or null if the element retains its name
      force - true if any existing child in the container with the target name should be replaced, and false to throw an exception in the event of a name collision
      monitor - a progress monitor
      Löst aus:
      JavaModelException - if this element could not be moved. Reasons include:
      • This Java element, container element, or sibling does not exist (ELEMENT_DOES_NOT_EXIST)
      • A CoreException occurred while updating an underlying resource
      • The container is of an incompatible type (INVALID_DESTINATION)
      • The sibling is not a child of the given container (INVALID_SIBLING)
      • The new name is invalid (INVALID_NAME)
      • A child in the container already exists with the same name (NAME_COLLISION) and replace has been specified as false
      • The container or this element is read-only (READ_ONLY)
      Siehe auch:
    • rename

      public void rename(String newName, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: ISourceManipulation
      Renames this element to the given name.
      Angegeben von:
      rename in Schnittstelle ISourceManipulation
      Setzt außer Kraft:
      rename in Klasse SourceRefElement
      Parameter:
      newName - the new name for the element
      force - true if any existing element with the target name should be replaced, and false to throw an exception in the event of a name collision
      monitor - a progress monitor
      Löst aus:
      JavaModelException - if this element could not be renamed. Reasons include:
      • This Java element does not exist (ELEMENT_DOES_NOT_EXIST)
      • A CoreException occurred while updating an underlying resource
      • The new name is invalid (INVALID_NAME)
      • A child in the container already exists with the same name (NAME_COLLISION) and replace has been specified as false
      • This element is read-only (READ_ONLY)
      Siehe auch:
    • setContents

      public void setContents(String contents, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException
      Löst aus:
      JavaModelException