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.aspectj.org.eclipse.jdt.core.dom package.
An abstract DOM builder that contains shared functionality of DOMBuilder and SimpleDOMBuilder.
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Deprecated.Set to true when an error is encounterd while fuzzy parsingprotected boolean
Deprecated.True when a compilation unit is being constructed.protected boolean
Deprecated.True when a compilation unit or type is being constructed.protected char[]
Deprecated.The String on which the JDOM is being created.protected int
Deprecated.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 DOMNode
Deprecated.The current node being constructed.protected Stack
Deprecated.A stack of enclosing scopes used when constructing a compilation unit or type. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptLineSeparatorPositions(int[] positions)
Deprecated.Accepts the line separator table and converts it into a line start table.protected void
Deprecated.Adds the given node to the current enclosing scope, building the JDOM tree.createCompilationUnit(char[] contents, char[] name)
Deprecated.createCompilationUnit(ICompilationUnit compilationUnit)
Deprecated.void
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
-
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
Deprecated.The current node being constructed.
-
-
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.
-
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. -
createCompilationUnit
Deprecated. -
enterCompilationUnit
public void enterCompilationUnit()Deprecated. -
exitCompilationUnit
public void exitCompilationUnit(int declarationEnd)Deprecated.Finishes the configuration of the compilation unit DOM object which was created by a previous enterCompilationUnit call. -
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: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 interfaceILineStartFinder
- 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 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
-