java.lang.Object
java.lang.Record
tools.jackson.dataformat.xml.ser.DTD
- All Implemented Interfaces:
PrologDirective,XmlGeneratorWritable
public record DTD(String rootName, String systemId, String publicId, String internalSubset)
extends Record
implements PrologDirective
Value container to represent XML Document Type Declaration,
to be written using
XmlGeneratorInitializer.- Since:
- 3.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinternalSubsetrecord component.publicId()Returns the value of thepublicIdrecord component.rootName()Returns the value of therootNamerecord component.systemId()Returns the value of thesystemIdrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(ToXmlGenerator xmlGen, org.codehaus.stax2.XMLStreamWriter2 xmlWriter) Method to call to actually write out the entity using givenXMLStreamWriter2.
-
Constructor Details
-
DTD
Creates an instance of aDTDrecord class.- Parameters:
rootName- the value for therootNamerecord componentsystemId- the value for thesystemIdrecord componentpublicId- the value for thepublicIdrecord componentinternalSubset- the value for theinternalSubsetrecord component
-
-
Method Details
-
write
public void write(ToXmlGenerator xmlGen, org.codehaus.stax2.XMLStreamWriter2 xmlWriter) throws XMLStreamException Description copied from interface:XmlGeneratorWritableMethod to call to actually write out the entity using givenXMLStreamWriter2.ToXmlGeneratoris only passed in case access to configuration was needed.- Specified by:
writein interfaceXmlGeneratorWritable- Parameters:
xmlGen- Generator that called this method: MUST NOT call its output methods, only to be used for configuration accessxmlWriter- Writer to use for actual output of XML event- Throws:
XMLStreamException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
rootName
Returns the value of therootNamerecord component.- Returns:
- the value of the
rootNamerecord component
-
systemId
Returns the value of thesystemIdrecord component.- Returns:
- the value of the
systemIdrecord component
-
publicId
Returns the value of thepublicIdrecord component.- Returns:
- the value of the
publicIdrecord component
-
internalSubset
Returns the value of theinternalSubsetrecord component.- Returns:
- the value of the
internalSubsetrecord component
-