Klasse BinaryModule

Alle implementierten Schnittstellen:
IAnnotatable, IJavaElement, IMember, IModuleDescription, IParent, ISourceManipulation, ISourceReference, AbstractModule, org.eclipse.core.runtime.IAdaptable

public class BinaryModule extends BinaryMember implements AbstractModule
  • Konstruktordetails

    • BinaryModule

      public BinaryModule(JavaElement parent, String name)
      For creating a pure handle from its memento.
    • BinaryModule

      public BinaryModule(JavaElement parent, IBinaryModule info)
      For creating a populated handle from a class file.
  • Methodendetails

    • getModuleInfo

      public IModule getModuleInfo() throws JavaModelException
      Angegeben von:
      getModuleInfo in Schnittstelle AbstractModule
      Löst aus:
      JavaModelException
    • getAnnotations

      public IAnnotation[] getAnnotations() throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: IAnnotatable
      Returns the annotations for this element. Returns an empty array if this element has no annotations.
      Angegeben von:
      getAnnotations in Schnittstelle IAnnotatable
      Setzt außer Kraft:
      getAnnotations in Klasse SourceRefElement
      Gibt zurück:
      the annotations of this element, in the order declared in the source, or an empty array if none
      Löst aus:
      JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource.
    • getChildren

      public IJavaElement[] getChildren() throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: IParent
      Returns the immediate children of this element. Unless otherwise specified by the implementing element, the children are in no particular order.
      Angegeben von:
      getChildren in Schnittstelle IParent
      Setzt außer Kraft:
      getChildren in Klasse JavaElement
      Gibt zurück:
      the immediate children of this element
      Löst aus:
      JavaModelException - if this element does not exist or 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 BinaryMember
      Gibt zurück:
      true if from a class file, and false if from a compilation unit
      Siehe auch:
    • isSystemModule

      public boolean isSystemModule()
      Angegeben von:
      isSystemModule in Schnittstelle IModuleDescription
      Gibt zurück:
      true if this module is a system module, else false
    • 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
      Setzt außer Kraft:
      getFlags in Klasse Member
      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:
    • getHandleMementoDelimiter

      public char getHandleMementoDelimiter()
      Beschreibung aus Klasse kopiert: JavaElement
      Returns the char that marks the start of this handles contribution to a memento.
      Setzt außer Kraft:
      getHandleMementoDelimiter in Klasse Member
      Siehe auch:
    • getKey

      public String getKey(boolean forceOpen) throws JavaModelException
      Angegeben von:
      getKey in Klasse BinaryMember
      Löst aus:
      JavaModelException
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.lookup.Binding#computeUniqueKey()
    • 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 BinaryMember
      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:
    • getAttachedJavadoc

      public String getAttachedJavadoc(org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: IJavaElement

      Returns the Javadoc as HTML source if this element has attached Javadoc, null otherwise.

      This should be used only for binary elements. Source elements will always return null.

      The encoding used to read the Javadoc is the one defined by the content type of the file. If none is defined, then the project's encoding of this Java element is used. If the project's encoding cannot be retrieved, then the platform encoding is used.

      In case the Javadoc doesn't exist for this element, null is returned.

      The HTML is extracted from the attached Javadoc and provided as is. No transformation or validation is done.

      Angegeben von:
      getAttachedJavadoc in Schnittstelle IJavaElement
      Setzt außer Kraft:
      getAttachedJavadoc in Klasse JavaElement
      Parameter:
      monitor - the given progress monitor, can be null
      Gibt zurück:
      the extracted javadoc from the attached javadoc, null if none
      Löst aus:
      JavaModelException - if:
      • this element does not exist
      • retrieving the attached javadoc fails (timed-out, invalid URL, ...)
      • the format of the javadoc doesn't match expected standards (different anchors,...)
      Siehe auch:
    • getJavadocContents

      public JavadocContents getJavadocContents(org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException
      Löst aus:
      JavaModelException
    • toString

      public String toString(String lineDelimiter)
      Angegeben von:
      toString in Schnittstelle AbstractModule