public class SourceRoot
extends java.lang.Object
SourceSection. A document
root can contain top level contents that are not enclosed by any headers. For example:
Top Level content. # Header1
| Constructor and Description |
|---|
SourceRoot(int startIndex,
int endIndex,
DiagCollector diagCollector,
Location sourceLocation) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSection(SourceSection section)
Add a section to the document.
|
void |
addTopLevelContents(java.util.Collection<ContentElement> contents)
Add top level contents to the document.
|
void |
error(java.lang.String message,
java.lang.Object... params)
Reports error message.
|
int |
getEndIndex()
The end index (exclusive) of the content the node represents from the source.
|
java.lang.Iterable<SourceSection> |
getSections()
Returns sections of the document.
|
int |
getStartIndex()
The start index (inclusive) of the content the node represents from the source.
|
java.lang.Iterable<ContentElement> |
getTopLevelContents()
Returns top level contents of the document.
|
public SourceRoot(int startIndex,
int endIndex,
DiagCollector diagCollector,
Location sourceLocation)
public void addTopLevelContents(java.util.Collection<ContentElement> contents)
public void addSection(SourceSection section)
public java.lang.Iterable<ContentElement> getTopLevelContents()
public java.lang.Iterable<SourceSection> getSections()
public int getStartIndex()
public int getEndIndex()
public void error(java.lang.String message,
java.lang.Object... params)