Klasse AbstractDOMBuilder

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.util.ReferenceInfoAdapter
org.aspectj.org.eclipse.jdt.internal.core.jdom.AbstractDOMBuilder
Alle implementierten Schnittstellen:
ILineStartFinder
Bekannte direkte Unterklassen:
DOMBuilder, SimpleDOMBuilder

public class AbstractDOMBuilder extends ReferenceInfoAdapter implements ILineStartFinder
Veraltet.
The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.
An abstract DOM builder that contains shared functionality of DOMBuilder and SimpleDOMBuilder.
  • Felddetails

    • fAbort

      protected boolean fAbort
      Veraltet.
      Set to true when an error is encounterd while fuzzy parsing
    • fBuildingCU

      protected boolean fBuildingCU
      Veraltet.
      True when a compilation unit is being constructed. False when any other type of document fragment is being constructed.
    • fBuildingType

      protected boolean fBuildingType
      Veraltet.
      True when a compilation unit or type is being constructed. False when any other type of document fragment is being constructed.
    • fDocument

      protected char[] fDocument
      Veraltet.
      The String on which the JDOM is being created.
    • fLineStartPositions

      protected int[] fLineStartPositions
      Veraltet.
      The source positions of all of the line separators in the document.
    • fStack

      protected Stack fStack
      Veraltet.
      A stack of enclosing scopes used when constructing a compilation unit or type. The top of the stack is the document fragment that children are added to.
    • fFieldCount

      protected int fFieldCount
      Veraltet.
      The number of fields constructed in the current document. This is used when building a single field document fragment, since the DOMBuilder only accepts documents with one field declaration.
    • fNode

      protected DOMNode fNode
      Veraltet.
      The current node being constructed.
  • Konstruktordetails

    • AbstractDOMBuilder

      public AbstractDOMBuilder()
      Veraltet.
      AbstractDOMBuilder constructor.
  • Methodendetails

    • acceptLineSeparatorPositions

      public void acceptLineSeparatorPositions(int[] positions)
      Veraltet.
      Accepts the line separator table and converts it into a line start table.

      A line separator might corresponds to several characters in the source.

      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.IDocumentElementRequestor#acceptLineSeparatorPositions(int[])
    • addChild

      protected void addChild(IDOMNode child)
      Veraltet.
      Adds the given node to the current enclosing scope, building the JDOM tree. Nodes are only added to an enclosing scope when a compilation unit or type is being built (since those are the only nodes that have children).

      NOTE: nodes are added to the JDOM via the method #basicAddChild such that the nodes in the newly created JDOM are not fragmented.

    • createCompilationUnit

      public IDOMCompilationUnit createCompilationUnit(char[] contents, char[] name)
      Veraltet.
      Siehe auch:
    • createCompilationUnit

      public IDOMCompilationUnit createCompilationUnit(ICompilationUnit compilationUnit)
      Veraltet.
      Siehe auch:
    • enterCompilationUnit

      public void enterCompilationUnit()
      Veraltet.
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.IDocumentElementRequestor#enterClass(int, int[], int, int, int, char[], int, int, char[], int, int, char[][], int[], int[], int)
    • exitCompilationUnit

      public void exitCompilationUnit(int declarationEnd)
      Veraltet.
      Finishes the configuration of the compilation unit DOM object which was created by a previous enterCompilationUnit call.
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.IDocumentElementRequestor#exitCompilationUnit(int)
    • exitType

      protected void exitType(int bodyEnd, int declarationEnd)
      Veraltet.
      Finishes the configuration of the class and interface DOM objects.
      Parameter:
      bodyEnd - - a source position corresponding to the closing bracket of the class
      declarationEnd - - a source position corresponding to the end of the class declaration. This can include whitespace and comments following the closing bracket.
    • getLineStart

      public int getLineStart(int position)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: ILineStartFinder
      Returns the position of the start of the line at or before the given source position.

      This defaults to zero if the position corresponds to a position on the first line of the source.

      Angegeben von:
      getLineStart in Schnittstelle ILineStartFinder
      Siehe auch:
    • initializeBuild

      protected void initializeBuild(char[] sourceCode, boolean buildingCompilationUnit, boolean buildingType)
      Veraltet.
      Initializes the builder to create a document fragment.
      Parameter:
      sourceCode - - the document containing the source code to be analyzed
      buildingCompilationUnit - - true if a the document is being analyzed to create a compilation unit, otherwise false
      buildingType - - true if the document is being analyzed to create a type or compilation unit