Record Class SourceGeneratorConfig
java.lang.Object
java.lang.Record
io.micronaut.jsonschema.generator.utils.SourceGeneratorConfig
- Record Components:
inputStream
- The Input Stream of the JSON schema to be processed.jsonUrl
- The URL of the JSON schema file to be downloaded or processed.jsonFile
- The JSON schema file, typically ending in.schema.json
.inputFolder
- The path to the folder where the input files (JSON schemas) are located.outputPath
- The path where generated source files will be saved. This is a required field. The path should be a valid, writable directory path.outputPackageName
- The package name to be applied to the generated source files. This field is optional and can benull
if no package name is needed.outputFileName
- The name of the file where the generated source code will be written. This field is optional.
public record SourceGeneratorConfig(InputStream inputStream, String jsonUrl, File jsonFile, Path inputFolder, Path outputPath, String outputPackageName, String outputFileName)
extends Record
A configuration class for the JSON schema source generator, encapsulating the configuration
properties related to the input and output paths, file names, and URL.
This class is used to specify:
- The URL of the JSON schema file to be processed (
jsonUrl
) - The name of the JSON schema file (
jsonFileName
) - The input folder where schema files might be located (
inputFolder
) - The output directory for generated source files (
outputPath
) - The package name to be applied to the generated source files (
outputPackageName
) - The output file name for the generated source (
outputFileName
)
- Author:
- Elif Kurtay
-
Constructor Summary
ConstructorsConstructorDescriptionSourceGeneratorConfig
(InputStream inputStream, String jsonUrl, File jsonFile, Path inputFolder, Path outputPath, String outputPackageName, String outputFileName) Creates an instance of aSourceGeneratorConfig
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theinputFolder
record component.Returns the value of theinputStream
record component.jsonFile()
Returns the value of thejsonFile
record component.jsonUrl()
Returns the value of thejsonUrl
record component.Returns the value of theoutputFileName
record component.Returns the value of theoutputPackageName
record component.Returns the value of theoutputPath
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
SourceGeneratorConfig
public SourceGeneratorConfig(InputStream inputStream, String jsonUrl, File jsonFile, Path inputFolder, Path outputPath, String outputPackageName, String outputFileName) Creates an instance of aSourceGeneratorConfig
record class.- Parameters:
inputStream
- the value for theinputStream
record componentjsonUrl
- the value for thejsonUrl
record componentjsonFile
- the value for thejsonFile
record componentinputFolder
- the value for theinputFolder
record componentoutputPath
- the value for theoutputPath
record componentoutputPackageName
- the value for theoutputPackageName
record componentoutputFileName
- the value for theoutputFileName
record component
-
-
Method Details
-
getInputName
-
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)
. -
inputStream
Returns the value of theinputStream
record component.- Returns:
- the value of the
inputStream
record component
-
jsonUrl
Returns the value of thejsonUrl
record component.- Returns:
- the value of the
jsonUrl
record component
-
jsonFile
Returns the value of thejsonFile
record component.- Returns:
- the value of the
jsonFile
record component
-
inputFolder
Returns the value of theinputFolder
record component.- Returns:
- the value of the
inputFolder
record component
-
outputPath
Returns the value of theoutputPath
record component.- Returns:
- the value of the
outputPath
record component
-
outputPackageName
Returns the value of theoutputPackageName
record component.- Returns:
- the value of the
outputPackageName
record component
-
outputFileName
Returns the value of theoutputFileName
record component.- Returns:
- the value of the
outputFileName
record component
-