Package eu.bandm.tools.tdom.runtime
Class TypedComment
java.lang.Object
eu.bandm.tools.tdom.runtime.TypedNode
eu.bandm.tools.tdom.runtime.TypedEthereal
eu.bandm.tools.tdom.runtime.TypedComment
Realizes comments in a tdom model instance.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.tools.tdom.runtime.TypedNode
TypedNode.ParseListener<E extends TypedElement<?,
?>> -
Constructor Summary
ConstructorDescriptionComment with empty contents.TypedComment
(String text) Comment with contents. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dump
(ContentHandler contentHandler, LexicalHandler lexicalHandler) Write this model component to a SAX output stream.void
encode
(EncodingOutputStream out, TypedExtension ext) Abstract fall-back method which MUST be overridden and always throws an Exception.getText()
Returns the text contents.void
set the text contents.Methods inherited from class eu.bandm.tools.tdom.runtime.TypedEthereal
forAnyExtension
Methods inherited from class eu.bandm.tools.tdom.runtime.TypedNode
asBigDecimal, asBigDecimal, asBigDecimal, asBigDecimal, asBigInteger, asBigInteger, asBigInteger, asBigInteger, asBoolean, asBoolean, asDouble, asDouble, asDouble, asDouble, asFloat, asFloat, asFloat, asFloat, asHexInt, asHexInt, asHexInt, asHexInt, asInt, asInt, asInt, asInt, asLong, asLong, asLong, asLong, asTrimmedString, asTrimmedString, asTrimmedString, asTrimmedString, checkPlus, checkPlus, checkStar, checkStar, checkStrict, encode, encodeOptional, encodePlus, encodePlus, encodeStar, encodeStar, extractEthereals, getLocation, getPCData, setLocation, setLocation, setLocation
-
Constructor Details
-
TypedComment
Comment with contents.- Throws:
IllegalArgumentException
- in case of text==null
-
TypedComment
public TypedComment()Comment with empty contents.
-
-
Method Details
-
getText
Returns the text contents.- Returns:
- the text contents.
-
setText
set the text contents.- Throws:
IllegalArgumentException
- in case of text==null
-
encode
Description copied from class:TypedNode
Abstract fall-back method which MUST be overridden and always throws an Exception.- Specified by:
encode
in classTypedNode
- Throws:
IOException
-
dump
public void dump(ContentHandler contentHandler, @Opt LexicalHandler lexicalHandler) throws SAXException Description copied from class:TypedEthereal
Write this model component to a SAX output stream. Please note that in the SAX architecture, PIs are treated by aContentHandler
, but Comments by aLexicalHandler
, so these two handlers must be supplied as a tandem for a method defined with this abstract class.- Specified by:
dump
in classTypedEthereal
- Parameters:
contentHandler
- (never null) SAX handler for writing a TypedProcessingInstructionlexicalHandler
- SAX handler for writing a Comment. If null, then the comments are silently discarded.- Throws:
SAXException
-