Package software.amazon.smithy.docgen
Record Class DocFormat
java.lang.Object
java.lang.Record
software.amazon.smithy.docgen.DocFormat
- Record Components:
name
- The name of the format. This will be the string that will be set as the value offormat
inDocSettings
.extension
- The file extension to use by default for documentation files. This will be set on theSymbol
s automatically byDocSymbolProvider.FileExtensionDecorator
.writerFactory
- A factory method for creating writers that write in this format.
public record DocFormat(String name, String extension, SymbolWriter.Factory<DocWriter> writerFactory)
extends Record
A record containing information about a doc format.
Use DocIntegration.docFormats(software.amazon.smithy.docgen.DocSettings)
to make new formats available.
-
Constructor Summary
ConstructorDescriptionDocFormat
(String name, String extension, SymbolWriter.Factory<DocWriter> writerFactory) Creates an instance of aDocFormat
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theextension
record component.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thewriterFactory
record component.
-
Constructor Details
-
DocFormat
Creates an instance of aDocFormat
record class.- Parameters:
name
- the value for thename
record componentextension
- the value for theextension
record componentwriterFactory
- the value for thewriterFactory
record component
-
-
Method Details
-
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)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
extension
Returns the value of theextension
record component.- Returns:
- the value of the
extension
record component
-
writerFactory
Returns the value of thewriterFactory
record component.- Returns:
- the value of the
writerFactory
record component
-