org.aspectj.org.eclipse.jdt.internal.core.jdom
Class AbstractDOMBuilder

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.util.ReferenceInfoAdapter
      extended by org.aspectj.org.eclipse.jdt.internal.core.jdom.AbstractDOMBuilder
All Implemented Interfaces:
ILineStartFinder
Direct Known Subclasses:
DOMBuilder, SimpleDOMBuilder

Deprecated. The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.aspectj.org.eclipse.jdt.core.dom package.

public class AbstractDOMBuilder
extends ReferenceInfoAdapter
implements ILineStartFinder

An abstract DOM builder that contains shared functionality of DOMBuilder and SimpleDOMBuilder.


Field Summary
protected  boolean fAbort
          Deprecated. Set to true when an error is encounterd while fuzzy parsing
protected  boolean fBuildingCU
          Deprecated. True when a compilation unit is being constructed.
protected  boolean fBuildingType
          Deprecated. True when a compilation unit or type is being constructed.
protected  char[] fDocument
          Deprecated. The String on which the JDOM is being created.
protected  int fFieldCount
          Deprecated. The number of fields constructed in the current document.
protected  int[] fLineStartPositions
          Deprecated. The source positions of all of the line separators in the document.
protected  DOMNode fNode
          Deprecated. The current node being constructed.
protected  java.util.Stack fStack
          Deprecated. A stack of enclosing scopes used when constructing a compilation unit or type.
 
Constructor Summary
AbstractDOMBuilder()
          Deprecated. AbstractDOMBuilder constructor.
 
Method Summary
 void acceptLineSeparatorPositions(int[] positions)
          Deprecated. Accepts the line separator table and converts it into a line start table.
protected  void addChild(IDOMNode child)
          Deprecated. Adds the given node to the current enclosing scope, building the JDOM tree.
 IDOMCompilationUnit createCompilationUnit(char[] contents, char[] name)
          Deprecated.  
 IDOMCompilationUnit createCompilationUnit(ICompilationUnit compilationUnit)
          Deprecated.  
 void enterCompilationUnit()
          Deprecated.  
 void exitCompilationUnit(int declarationEnd)
          Deprecated. Finishes the configuration of the compilation unit DOM object which was created by a previous enterCompilationUnit call.
protected  void exitType(int bodyEnd, int declarationEnd)
          Deprecated. Finishes the configuration of the class and interface DOM objects.
 int getLineStart(int position)
          Deprecated. Returns the position of the start of the line at or before the given source position.
protected  void initializeBuild(char[] sourceCode, boolean buildingCompilationUnit, boolean buildingType)
          Deprecated. Initializes the builder to create a document fragment.
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.util.ReferenceInfoAdapter
acceptAnnotationTypeReference, acceptAnnotationTypeReference, acceptConstructorReference, acceptFieldReference, acceptMethodReference, acceptTypeReference, acceptTypeReference, acceptUnknownReference, acceptUnknownReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fAbort

protected boolean fAbort
Deprecated. 
Set to true when an error is encounterd while fuzzy parsing


fBuildingCU

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


fBuildingType

protected boolean fBuildingType
Deprecated. 
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
Deprecated. 
The String on which the JDOM is being created.


fLineStartPositions

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


fStack

protected java.util.Stack fStack
Deprecated. 
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
Deprecated. 
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
Deprecated. 
The current node being constructed.

Constructor Detail

AbstractDOMBuilder

public AbstractDOMBuilder()
Deprecated. 
AbstractDOMBuilder constructor.

Method Detail

acceptLineSeparatorPositions

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

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

See Also:
IDocumentElementRequestor.acceptLineSeparatorPositions(int[])

addChild

protected void addChild(IDOMNode child)
Deprecated. 
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)
Deprecated. 
See Also:
IDOMFactory.createCompilationUnit(String, String)

createCompilationUnit

public IDOMCompilationUnit createCompilationUnit(ICompilationUnit compilationUnit)
Deprecated. 
See Also:
IDOMFactory.createCompilationUnit(String, String)

enterCompilationUnit

public void enterCompilationUnit()
Deprecated. 
See Also:
IDocumentElementRequestor.enterClass(int, int[], int, int, int, char[], int, int, char[], int, int, char[][], int[], int[], int)

exitCompilationUnit

public void exitCompilationUnit(int declarationEnd)
Deprecated. 
Finishes the configuration of the compilation unit DOM object which was created by a previous enterCompilationUnit call.

See Also:
IDocumentElementRequestor.exitCompilationUnit(int)

exitType

protected void exitType(int bodyEnd,
                        int declarationEnd)
Deprecated. 
Finishes the configuration of the class and interface DOM objects.

Parameters:
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)
Deprecated. 
Description copied from interface: 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.

Specified by:
getLineStart in interface ILineStartFinder
See Also:
ILineStartFinder.getLineStart(int)

initializeBuild

protected void initializeBuild(char[] sourceCode,
                               boolean buildingCompilationUnit,
                               boolean buildingType)
Deprecated. 
Initializes the builder to create a document fragment.

Parameters:
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