Class AbstractSink
- java.lang.Object
-
- org.apache.maven.doxia.sink.impl.AbstractSink
-
- Direct Known Subclasses:
SinkAdapter,SinkWrapper
public abstract class AbstractSink extends java.lang.Object implements Sink, Markup
An abstract base class that defines some convenience methods for sinks. Also acts as compatibility bridge for Doxia 1.0 methods which have overloaded variants in Doxia > 1.0 (taking an additional argumentSinkEventAttributes). This implementation just delegates the former to the latter with argumentSinkEventAttributesbeingnull.- Since:
- 1.1
-
-
Field Summary
Fields Modifier and Type Field Description private Locatorlocator-
Fields inherited from interface org.apache.maven.doxia.markup.Markup
COLON, EOL, EQUAL, GREATER_THAN, LEFT_CURLY_BRACKET, LEFT_SQUARE_BRACKET, LESS_THAN, MINUS, PLUS, QUOTE, RIGHT_CURLY_BRACKET, RIGHT_SQUARE_BRACKET, SEMICOLON, SLASH, SPACE, STAR
-
Fields inherited from interface org.apache.maven.doxia.sink.Sink
JUSTIFY_CENTER, JUSTIFY_LEFT, JUSTIFY_RIGHT, NUMBERING_DECIMAL, NUMBERING_LOWER_ALPHA, NUMBERING_LOWER_ROMAN, NUMBERING_UPPER_ALPHA, NUMBERING_UPPER_ROMAN, SECTION_LEVEL_1, SECTION_LEVEL_2, SECTION_LEVEL_3, SECTION_LEVEL_4, SECTION_LEVEL_5, SECTION_LEVEL_6
-
-
Constructor Summary
Constructors Constructor Description AbstractSink()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddress()Starts an address element.voidanchor(java.lang.String name)Starts an element which defines an anchor.voidarticle()Starts an article within a document.voidauthor()Starts an author element.voidblockquote()Starts a blockquote element.voidbody()Starts the body of a document.voidcontent()Start the main content section between the header and the footer within the sections and/or body.voiddata(java.lang.String value)Starts a data element which groups together other elements representing microformats.voiddate()Starts the date element.voiddefinedTerm()Starts a definition term element within a definition list.voiddefinition()Starts a definition element within a definition list.voiddefinitionList()Starts a definition list element.voiddefinitionListItem()Starts a list item element within a definition list.voiddivision()Starts a division element grouping together other elements.voidfigure()Starts a basic image embedding element.voidfigureCaption()Starts a caption of an image element.voidfigureGraphics(java.lang.String name)Adds a graphic element.voidfooter()Start a new footer within the section or body.static java.lang.StringformatLocation(Locator locator)Creates a string with line/column information.LocatorgetDocumentLocator()Returns the locator which exposes location information for a particular Sink event.protected java.lang.StringgetLocationLogPrefix()voidhead()Starts the head element.voidheader()Start a new header within the section or body.voidhorizontalRule()Adding a separator of sections from a text to each other.protected voidinit()This is called inhead()or inSink.close(), and can be used to set the sink into a clear state so it can be re-used.voidinline()Starts an inline element.voidlineBreak()Adds a line break.voidlineBreakOpportunity()Adds a line break opportunity.voidlink(java.lang.String name)Starts an element which defines a link.voidlist()Starts an unordered list element.voidlistItem()Starts a list item element within an unordered list.voidnavigation()Starts a navigation section within a document.voidnumberedList(int numbering)Starts an ordered list element.voidnumberedListItem()Starts a list item element within an ordered list.voidparagraph()Starts an element which represents a paragraph.voidsection1()Starts a first heading element which contains the topic of the section.voidsection1_()Ends a first heading element.voidsection2()Starts a second heading element which contains the topic of the section.voidsection2_()Ends a second heading element.voidsection3()Starts a third heading element which contains the topic of the section.voidsection3_()Ends a third heading element.voidsection4()Starts a 4th heading element which contains the topic of the section.voidsection4_()Ends a 4th heading element.voidsection5()Starts a 5th heading element which contains the topic of the section.voidsection5_()Ends a 5th heading element.voidsection6()Starts a 6th heading element which contains the topic of the section.voidsection6_()Ends a 6th heading element.voidsectionTitle()Starts a title heading element.voidsectionTitle_()Ends a title heading element.voidsectionTitle1()Starts a first title heading element.voidsectionTitle1_()Ends a first title heading element.voidsectionTitle2()Starts a second title heading element.voidsectionTitle2_()Ends a second title heading element.voidsectionTitle3()Starts a third title heading element.voidsectionTitle3_()Ends a third title heading element.voidsectionTitle4()Starts a 4th title heading element.voidsectionTitle4_()Ends a 4th title heading element.voidsectionTitle5()Starts a 5th title heading element.voidsectionTitle5_()Ends a 5th title heading element.voidsectionTitle6()Starts a 6th title heading element.voidsectionTitle6_()Ends a 6th title heading element.voidsetDocumentLocator(Locator locator)Sets the locator which exposes location information for a particular Sink event.voidsidebar()Starts a sidebar section within a document.voidtable()Starts a table element for marking up tabular information in a document.voidtableCaption()Starts a caption element of a table.voidtableCell()Starts a cell element which defines a cell that contains data.voidtableHeaderCell()Starts a cell element which defines a cell that contains header information.voidtableRow()Starts a row element which acts as a container for a row of table cells.voidtableRows()Starts an element that contains rows of table data.voidtext(java.lang.String text)Adding a text.voidtime(java.lang.String datetime)Starts a time element which groups together other elements representing a time.voidtitle()Starts the title element.protected static java.lang.StringunifyEOLs(java.lang.String text)Parses the given String and replaces all occurrences of '\n', '\r' and '\r\n' with the system EOL.voidverbatim()Starts a verbatim block, ie a block where whitespace has semantic relevance.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.maven.doxia.sink.Sink
address, address_, anchor, anchor_, article, article_, author, author_, blockquote, blockquote_, body, body_, bold, bold_, close, comment, content, content_, data, data_, date, date_, definedTerm, definedTerm_, definition, definition_, definitionList, definitionList_, definitionListItem, definitionListItem_, division, division_, figure, figure_, figureCaption, figureCaption_, figureGraphics, flush, footer, footer_, head, head_, header, header_, horizontalRule, inline, inline_, italic, italic_, lineBreak, lineBreakOpportunity, link, link_, list, list_, listItem, listItem_, monospaced, monospaced_, navigation, navigation_, nonBreakingSpace, numberedList, numberedList_, numberedListItem, numberedListItem_, pageBreak, paragraph, paragraph_, rawText, section, section_, sectionTitle, sectionTitle_, sidebar, sidebar_, table, table_, tableCaption, tableCaption_, tableCell, tableCell_, tableHeaderCell, tableHeaderCell_, tableRow, tableRow_, tableRows, tableRows_, text, time, time_, title, title_, unknown, verbatim, verbatim_
-
-
-
-
Field Detail
-
locator
private Locator locator
-
-
Method Detail
-
head
public final void head()
Description copied from interface:SinkStarts the head element. Shortcut forSink.head(SinkEventAttributes)with first argument beingnull.- Specified by:
headin interfaceSink- See Also:
Sink.head(SinkEventAttributes)
-
title
public final void title()
Description copied from interface:SinkStarts the title element. Shortcut forSink.title(SinkEventAttributes)with first argument beingnull.- Specified by:
titlein interfaceSink- See Also:
Sink.title(SinkEventAttributes)
-
author
public final void author()
Description copied from interface:SinkStarts an author element. Shortcut forSink.author(SinkEventAttributes)with first argument beingnull.- Specified by:
authorin interfaceSink- See Also:
Sink.author(SinkEventAttributes)
-
date
public final void date()
Description copied from interface:SinkStarts the date element. Shortcut forSink.date(SinkEventAttributes)with first argument beingnull.- Specified by:
datein interfaceSink- See Also:
Sink.date(SinkEventAttributes)
-
body
public final void body()
Description copied from interface:SinkStarts the body of a document. Shortcut forSink.body(SinkEventAttributes)with first argument beingnull.- Specified by:
bodyin interfaceSink- See Also:
Sink.body(SinkEventAttributes)
-
article
public final void article()
Description copied from interface:SinkStarts an article within a document. Shortcut forSink.article(SinkEventAttributes)with first argument beingnull.- Specified by:
articlein interfaceSink- See Also:
Sink.article(SinkEventAttributes)
-
navigation
public final void navigation()
Description copied from interface:SinkStarts a navigation section within a document. Shortcut forSink.navigation(SinkEventAttributes)with first argument beingnull.- Specified by:
navigationin interfaceSink- See Also:
Sink.navigation(SinkEventAttributes)
-
sidebar
public final void sidebar()
Description copied from interface:SinkStarts a sidebar section within a document. Shortcut forSink.sidebar(SinkEventAttributes)with first argument beingnull.- Specified by:
sidebarin interfaceSink- See Also:
Sink.sidebar(SinkEventAttributes)
-
sectionTitle
public final void sectionTitle()
Description copied from interface:SinkStarts a title heading element. Shortcut forSink.sectionTitle(int, SinkEventAttributes)with first argument being0and second argument beingnull.- Specified by:
sectionTitlein interfaceSink
-
section1
public final void section1()
Description copied from interface:SinkStarts a first heading element which contains the topic of the section. Shortcut forSink.section(int, SinkEventAttributes)with first argument being1and second argument beingnull.- Specified by:
section1in interfaceSink- See Also:
Sink.section(int,SinkEventAttributes)
-
sectionTitle_
public final void sectionTitle_()
Description copied from interface:SinkEnds a title heading element. Shortcut forSink.sectionTitle_(int)with argument being0.- Specified by:
sectionTitle_in interfaceSink
-
section1_
public final void section1_()
Description copied from interface:SinkEnds a first heading element. Shortcut forSink.section_(int)with argument being1.
-
sectionTitle1
public final void sectionTitle1()
Description copied from interface:SinkStarts a first title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section1()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being1and second argument beingnull.- Specified by:
sectionTitle1in interfaceSink- See Also:
Sink.sectionTitle(int,SinkEventAttributes)
-
sectionTitle1_
public final void sectionTitle1_()
Description copied from interface:SinkEnds a first title heading element. Shortcut forSink.sectionTitle_(int)with argument being1.- Specified by:
sectionTitle1_in interfaceSink
-
section2
public final void section2()
Description copied from interface:SinkStarts a second heading element which contains the topic of the section. This has to be contained within aSink.section1()element.Shortcut for
Sink.section(int, SinkEventAttributes)with first argument being2and second argument beingnull.- Specified by:
section2in interfaceSink- See Also:
Sink.section(int,SinkEventAttributes)
-
section2_
public final void section2_()
Description copied from interface:SinkEnds a second heading element. Shortcut forSink.section_(int)with argument being2.
-
sectionTitle2
public final void sectionTitle2()
Description copied from interface:SinkStarts a second title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section2()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being2and second argument beingnull.- Specified by:
sectionTitle2in interfaceSink- See Also:
Sink.sectionTitle(int,SinkEventAttributes)
-
sectionTitle2_
public final void sectionTitle2_()
Description copied from interface:SinkEnds a second title heading element. Shortcut forSink.sectionTitle_(int)with argument being2.- Specified by:
sectionTitle2_in interfaceSink
-
section3
public final void section3()
Description copied from interface:SinkStarts a third heading element which contains the topic of the section. This has to be contained within aSink.section2()element.Shortcut for
Sink.section(int, SinkEventAttributes)with first argument being3and second argument beingnull.- Specified by:
section3in interfaceSink- See Also:
Sink.section(int,SinkEventAttributes)
-
section3_
public final void section3_()
Description copied from interface:SinkEnds a third heading element. Shortcut forSink.section_(int)with argument being3.
-
sectionTitle3
public final void sectionTitle3()
Description copied from interface:SinkStarts a third title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section3()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being3and second argument beingnull.- Specified by:
sectionTitle3in interfaceSink- See Also:
Sink.sectionTitle(int,SinkEventAttributes)
-
sectionTitle3_
public final void sectionTitle3_()
Description copied from interface:SinkEnds a third title heading element. Shortcut forSink.sectionTitle_(int)with argument being3.- Specified by:
sectionTitle3_in interfaceSink
-
section4
public final void section4()
Description copied from interface:SinkStarts a 4th heading element which contains the topic of the section. This has to be contained within aSink.section3()element.Shortcut for
Sink.section(int, SinkEventAttributes)with first argument being4and second argument beingnull.- Specified by:
section4in interfaceSink- See Also:
Sink.section(int,SinkEventAttributes)
-
section4_
public final void section4_()
Description copied from interface:SinkEnds a 4th heading element. Shortcut forSink.section_(int)with argument being4.
-
sectionTitle4
public final void sectionTitle4()
Description copied from interface:SinkStarts a 4th title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section4()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being4and second argument beingnull.- Specified by:
sectionTitle4in interfaceSink- See Also:
Sink.sectionTitle(int,SinkEventAttributes)
-
sectionTitle4_
public final void sectionTitle4_()
Description copied from interface:SinkEnds a 4th title heading element. Shortcut forSink.sectionTitle_(int)with argument being4.- Specified by:
sectionTitle4_in interfaceSink
-
section5
public final void section5()
Description copied from interface:SinkStarts a 5th heading element which contains the topic of the section. This has to be contained within aSink.section5()element.Shortcut for
Sink.section(int, SinkEventAttributes)with first argument being5and second argument beingnull.- Specified by:
section5in interfaceSink- See Also:
Sink.section(int,SinkEventAttributes)
-
section5_
public final void section5_()
Description copied from interface:SinkEnds a 5th heading element. Shortcut forSink.section_(int)with argument being5.
-
sectionTitle5
public final void sectionTitle5()
Description copied from interface:SinkStarts a 5th title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section5()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being5and second argument beingnull.- Specified by:
sectionTitle5in interfaceSink- See Also:
Sink.sectionTitle(int,SinkEventAttributes)
-
sectionTitle5_
public final void sectionTitle5_()
Description copied from interface:SinkEnds a 5th title heading element. Shortcut forSink.sectionTitle_(int)with argument being5.- Specified by:
sectionTitle5_in interfaceSink
-
section6
public final void section6()
Description copied from interface:SinkStarts a 6th heading element which contains the topic of the section. This has to be contained within aSink.section6()element.Shortcut for
Sink.section(int, SinkEventAttributes)with first argument being6and second argument beingnull.- Specified by:
section6in interfaceSink- See Also:
Sink.section(int,SinkEventAttributes)
-
section6_
public final void section6_()
Description copied from interface:SinkEnds a 6th heading element. Shortcut forSink.section_(int)with argument being6.
-
sectionTitle6
public final void sectionTitle6()
Description copied from interface:SinkStarts a 6th title heading element. This element is optional, but if it exists, it has to be contained, and be the first element, within aSink.section5()element.Shortcut for
Sink.sectionTitle(int, SinkEventAttributes)with first argument being6and second argument beingnull.- Specified by:
sectionTitle6in interfaceSink- See Also:
Sink.sectionTitle(int,SinkEventAttributes)
-
sectionTitle6_
public final void sectionTitle6_()
Description copied from interface:SinkEnds a 6th title heading element. Shortcut forSink.sectionTitle_(int)with argument being6.- Specified by:
sectionTitle6_in interfaceSink
-
header
public final void header()
Description copied from interface:SinkStart a new header within the section or body. Shortcut forSink.header(SinkEventAttributes)with argument beingnull.
-
content
public final void content()
Description copied from interface:SinkStart the main content section between the header and the footer within the sections and/or body. Shortcut forSink.content(SinkEventAttributes)with argument beingnull.
-
footer
public final void footer()
Description copied from interface:SinkStart a new footer within the section or body. Shortcut forSink.footer(SinkEventAttributes)with argument beingnull.
-
list
public final void list()
Description copied from interface:SinkStarts an unordered list element. Shortcut forSink.list(SinkEventAttributes)with argument beingnull.- Specified by:
listin interfaceSink- See Also:
Sink.list(SinkEventAttributes)
-
listItem
public final void listItem()
Description copied from interface:SinkStarts a list item element within an unordered list. Shortcut forSink.listItem(SinkEventAttributes)with argument beingnull.- Specified by:
listItemin interfaceSink- See Also:
Sink.listItem(SinkEventAttributes)
-
numberedList
public final void numberedList(int numbering)
Description copied from interface:SinkStarts an ordered list element. Shortcut forSink.numberedList(int, SinkEventAttributes)with first argument beingnumberingand second argument beingnull.- Specified by:
numberedListin interfaceSink- Parameters:
numbering- the numbering style.- See Also:
Sink.numberedList(int,SinkEventAttributes)
-
numberedListItem
public final void numberedListItem()
Description copied from interface:SinkStarts a list item element within an ordered list. Shortcut forSink.numberedListItem(SinkEventAttributes)with argument beingnull.- Specified by:
numberedListItemin interfaceSink- See Also:
Sink.numberedListItem(SinkEventAttributes)
-
definitionList
public final void definitionList()
Description copied from interface:SinkStarts a definition list element. Shortcut forSink.definitionList(SinkEventAttributes)with argument beingnull.- Specified by:
definitionListin interfaceSink- See Also:
Sink.definitionList(SinkEventAttributes)
-
definitionListItem
public final void definitionListItem()
Description copied from interface:SinkStarts a list item element within a definition list. Shortcut forSink.definitionListItem(SinkEventAttributes)with argument beingnull.- Specified by:
definitionListItemin interfaceSink- See Also:
Sink.definitionListItem(SinkEventAttributes)
-
definition
public final void definition()
Description copied from interface:SinkStarts a definition element within a definition list. Shortcut forSink.definition(SinkEventAttributes)with argument beingnull.- Specified by:
definitionin interfaceSink- See Also:
Sink.definition(SinkEventAttributes)
-
definedTerm
public final void definedTerm()
Description copied from interface:SinkStarts a definition term element within a definition list. Shortcut forSink.definedTerm(SinkEventAttributes)with argument beingnull.- Specified by:
definedTermin interfaceSink- See Also:
Sink.definedTerm(SinkEventAttributes)
-
figure
public final void figure()
Description copied from interface:SinkStarts a basic image embedding element. Shortcut forSink.figure(SinkEventAttributes)with argument beingnull.- Specified by:
figurein interfaceSink- See Also:
Sink.figure(SinkEventAttributes)
-
figureCaption
public final void figureCaption()
Description copied from interface:SinkStarts a caption of an image element. Shortcut forSink.figureCaption(SinkEventAttributes)with argument beingnull.- Specified by:
figureCaptionin interfaceSink- See Also:
Sink.figureCaption(SinkEventAttributes)
-
figureGraphics
public final void figureGraphics(java.lang.String name)
Description copied from interface:SinkAdds a graphic element. Shortcut forSink.figureGraphics(String, SinkEventAttributes)with first argument beingsrcand second argument beingnull.- Specified by:
figureGraphicsin interfaceSink- Parameters:
name- the source
-
table
public final void table()
Description copied from interface:SinkStarts a table element for marking up tabular information in a document. Shortcut forSink.table(SinkEventAttributes)with argument beingnull.- Specified by:
tablein interfaceSink- See Also:
Sink.table(SinkEventAttributes)
-
tableRows
public final void tableRows()
Description copied from interface:SinkStarts an element that contains rows of table data. Shortcut forSink.tableRows(int[], boolean)with first argument beingnulland second beingfalse.- Specified by:
tableRowsin interfaceSink- See Also:
Sink.tableRows(int[], boolean)
-
tableRow
public final void tableRow()
Description copied from interface:SinkStarts a row element which acts as a container for a row of table cells. Shortcut forSink.tableRow(SinkEventAttributes)with argument beingnull.- Specified by:
tableRowin interfaceSink- See Also:
Sink.tableRow(SinkEventAttributes)
-
tableCell
public final void tableCell()
Description copied from interface:SinkStarts a cell element which defines a cell that contains data. Shortcut forSink.tableCell(SinkEventAttributes)with argument beingnull.- Specified by:
tableCellin interfaceSink- See Also:
Sink.tableCell(SinkEventAttributes)
-
tableHeaderCell
public final void tableHeaderCell()
Description copied from interface:SinkStarts a cell element which defines a cell that contains header information. Shortcut forSink.tableHeaderCell(SinkEventAttributes)with argument beingnull.- Specified by:
tableHeaderCellin interfaceSink- See Also:
Sink.tableHeaderCell(SinkEventAttributes)
-
tableCaption
public final void tableCaption()
Description copied from interface:SinkStarts a caption element of a table. Shortcut forSink.tableCaption(SinkEventAttributes)with argument beingnull.- Specified by:
tableCaptionin interfaceSink- See Also:
Sink.tableCaption(SinkEventAttributes)
-
paragraph
public final void paragraph()
Description copied from interface:SinkStarts an element which represents a paragraph. Shortcut forSink.paragraph(SinkEventAttributes)with argument beingnull.- Specified by:
paragraphin interfaceSink- See Also:
Sink.paragraph(SinkEventAttributes)
-
data
public final void data(java.lang.String value)
Description copied from interface:SinkStarts a data element which groups together other elements representing microformats. Shortcut forSink.data(String, SinkEventAttributes)with first argument being {code value} and second argument beingnull.- Specified by:
datain interfaceSink- Parameters:
value- aStringobject.- See Also:
Sink.data(String, SinkEventAttributes)
-
time
public final void time(java.lang.String datetime)
Description copied from interface:SinkStarts a time element which groups together other elements representing a time. Shortcut forSink.time(String, SinkEventAttributes)with first argument being {code datetime} and second argument beingnull.- Specified by:
timein interfaceSink- See Also:
Sink.time(String, SinkEventAttributes)
-
address
public final void address()
Description copied from interface:SinkStarts an address element. Shortcut forSink.address(SinkEventAttributes)with argument beingnull.- Specified by:
addressin interfaceSink- See Also:
Sink.address(SinkEventAttributes)
-
blockquote
public final void blockquote()
Description copied from interface:SinkStarts a blockquote element. Shortcut forSink.blockquote(SinkEventAttributes)with argument beingnull.- Specified by:
blockquotein interfaceSink- See Also:
Sink.blockquote(SinkEventAttributes)
-
division
public final void division()
Description copied from interface:SinkStarts a division element grouping together other elements. Shortcut forSink.division(SinkEventAttributes)with argument beingnull.- Specified by:
divisionin interfaceSink- See Also:
Sink.division(SinkEventAttributes)
-
verbatim
public final void verbatim()
Description copied from interface:SinkStarts a verbatim block, ie a block where whitespace has semantic relevance. Shortcut forSink.verbatim(SinkEventAttributes)with argument beingnull.- Specified by:
verbatimin interfaceSink- See Also:
Sink.verbatim(SinkEventAttributes)
-
horizontalRule
public final void horizontalRule()
Description copied from interface:SinkAdding a separator of sections from a text to each other. Shortcut forSink.horizontalRule(SinkEventAttributes)with argument beingnull.- Specified by:
horizontalRulein interfaceSink- See Also:
Sink.horizontalRule(SinkEventAttributes)
-
anchor
public final void anchor(java.lang.String name)
Description copied from interface:SinkStarts an element which defines an anchor. Shortcut forSink.anchor(String, SinkEventAttributes)with first argument beingnameand second argument beingnull.- Specified by:
anchorin interfaceSink- Parameters:
name- the name of the anchor.- See Also:
Sink.anchor(String,SinkEventAttributes)
-
link
public final void link(java.lang.String name)
Description copied from interface:SinkStarts an element which defines a link. Shortcut forSink.link(String, SinkEventAttributes)with first argument beingnameand second argument beingnull.- Specified by:
linkin interfaceSink- Parameters:
name- the name of the link.- See Also:
Sink.link(String,SinkEventAttributes)
-
inline
public final void inline()
Description copied from interface:SinkStarts an inline element. Shortcut forSink.inline(SinkEventAttributes)with argument beingnull.- Specified by:
inlinein interfaceSink- See Also:
Sink.inline(SinkEventAttributes)
-
lineBreak
public final void lineBreak()
Description copied from interface:SinkAdds a line break. Shortcut forSink.lineBreak(SinkEventAttributes)with argument beingnull.- Specified by:
lineBreakin interfaceSink- See Also:
Sink.lineBreak(SinkEventAttributes)
-
lineBreakOpportunity
public final void lineBreakOpportunity()
Description copied from interface:SinkAdds a line break opportunity. Shortcut forSink.lineBreakOpportunity(SinkEventAttributes)with argument beingnull.- Specified by:
lineBreakOpportunityin interfaceSink- See Also:
Sink.lineBreak(SinkEventAttributes)
-
text
public final void text(java.lang.String text)
Description copied from interface:SinkAdding a text. Shortcut forSink.text(String, SinkEventAttributes)with first argument beingtextand second argument beingnull.- Specified by:
textin interfaceSink- Parameters:
text- The text to write.- See Also:
Sink.text(String,SinkEventAttributes)
-
unifyEOLs
protected static java.lang.String unifyEOLs(java.lang.String text)
Parses the given String and replaces all occurrences of '\n', '\r' and '\r\n' with the system EOL. All Sinks should make sure that text output is filtered through this method.- Parameters:
text- the text to scan. May be null in which case null is returned.- Returns:
- a String that contains only System EOLs.
-
init
protected void init()
This is called inhead()or inSink.close(), and can be used to set the sink into a clear state so it can be re-used.- Since:
- 1.1.2
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
Description copied from interface:SinkSets the locator which exposes location information for a particular Sink event.- Specified by:
setDocumentLocatorin interfaceSink- Parameters:
locator- the locator (nevernull).
-
getDocumentLocator
public Locator getDocumentLocator()
Description copied from interface:SinkReturns the locator which exposes location information for a particular Sink event.- Specified by:
getDocumentLocatorin interfaceSink- Returns:
- the locator (never
null).
-
getLocationLogPrefix
protected java.lang.String getLocationLogPrefix()
-
formatLocation
public static java.lang.String formatLocation(Locator locator)
Creates a string with line/column information. Inspired byo.a.m.model.building.ModelProblemUtils.formatLocation(...).- Parameters:
locator- The locator must not benull.- Returns:
- The formatted location or an empty string if unknown, never
null.
-
-