Class AbstractDOMBuilder
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.util.ReferenceInfoAdapter
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.eclipse.jdt.core.dom package.
An abstract DOM builder that contains shared functionality of DOMBuilder and SimpleDOMBuilder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanDeprecated.Set to true when an error is encounterd while fuzzy parsingprotected booleanDeprecated.True when a compilation unit is being constructed.protected booleanDeprecated.True when a compilation unit or type is being constructed.protected char[]Deprecated.The String on which the JDOM is being created.protected intDeprecated.The number of fields constructed in the current document.protected int[]Deprecated.The source positions of all of the line separators in the document.protected DOMNodeDeprecated.The current node being constructed.protected StackDeprecated.A stack of enclosing scopes used when constructing a compilation unit or type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptLineSeparatorPositions(int[] positions) Deprecated.Accepts the line separator table and converts it into a line start table.protected voidDeprecated.Adds the given node to the current enclosing scope, building the JDOM tree.createCompilationUnit(char[] contents, char[] name) Deprecated.createCompilationUnit(ICompilationUnit compilationUnit) Deprecated.voidDeprecated.voidexitCompilationUnit(int declarationEnd) Deprecated.Finishes the configuration of the compilation unit DOM object which was created by a previous enterCompilationUnit call.protected voidexitType(int bodyEnd, int declarationEnd) Deprecated.Finishes the configuration of the class and interface DOM objects.intgetLineStart(int position) Deprecated.Returns the position of the start of the line at or before the given source position.protected voidinitializeBuild(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
-
Field Details
-
fAbort
protected boolean fAbortDeprecated.Set to true when an error is encounterd while fuzzy parsing -
fBuildingCU
protected boolean fBuildingCUDeprecated.True when a compilation unit is being constructed. False when any other type of document fragment is being constructed. -
fBuildingType
protected boolean fBuildingTypeDeprecated.True when a compilation unit or type is being constructed. False when any other type of document fragment is being constructed. -
fDocument
protected char[] fDocumentDeprecated.The String on which the JDOM is being created. -
fLineStartPositions
protected int[] fLineStartPositionsDeprecated.The source positions of all of the line separators in the document. -
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 fFieldCountDeprecated.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
-
-
Constructor Details
-
AbstractDOMBuilder
public AbstractDOMBuilder()Deprecated.AbstractDOMBuilder constructor.
-
-
Method Details
-
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:
-
addChild
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
Deprecated.- See Also:
-
createCompilationUnit
Deprecated.- See Also:
-
enterCompilationUnit
public void enterCompilationUnit()Deprecated.- See Also:
-
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:
-
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 classdeclarationEnd- - 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:ILineStartFinderReturns 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:
getLineStartin interfaceILineStartFinder- See Also:
-
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 analyzedbuildingCompilationUnit- - true if a the document is being analyzed to create a compilation unit, otherwise falsebuildingType- - true if the document is being analyzed to create a type or compilation unit
-