Record Class GenerateSimpleRecordTask
java.lang.Object
java.lang.Record
io.micronaut.sourcegen.example.plugin.GenerateSimpleRecordTask
- Record Components:
typeName- The generated class nameversion- The versionpackageName- The package nameproperties- The propertiesjavadoc- The javadocoutputFolder- The output folder
@PluginTask
public record GenerateSimpleRecordTask(String typeName, Integer version, String packageName, Map<String,String> properties, List<String> javadoc, File outputFolder)
extends Record
This is a configuration for a plugin task run.
The properties are parameters and the single method defines the task execution.
The plugin generates a simple record.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidGenerate a simple record in the supplied package and with the specified version.final inthashCode()Returns a hash code value for this object.javadoc()Returns the value of thejavadocrecord component.Returns the value of theoutputFolderrecord component.Returns the value of thepackageNamerecord component.Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.typeName()Returns the value of thetypeNamerecord component.version()Returns the value of theversionrecord component.
-
Constructor Details
-
GenerateSimpleRecordTask
public GenerateSimpleRecordTask(String typeName, Integer version, String packageName, Map<String, String> properties, List<String> javadoc, File outputFolder) Creates an instance of aGenerateSimpleRecordTaskrecord class.- Parameters:
typeName- the value for thetypeNamerecord componentversion- the value for theversionrecord componentpackageName- the value for thepackageNamerecord componentproperties- the value for thepropertiesrecord componentjavadoc- the value for thejavadocrecord componentoutputFolder- the value for theoutputFolderrecord component
-
-
Method Details
-
generateSimpleRecord
Generate a simple record in the supplied package and with the specified version. This javadoc will be copied to the respected plugin implementations. -
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). -
typeName
Returns the value of thetypeNamerecord component.- Returns:
- the value of the
typeNamerecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
packageName
Returns the value of thepackageNamerecord component.- Returns:
- the value of the
packageNamerecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
javadoc
Returns the value of thejavadocrecord component.- Returns:
- the value of the
javadocrecord component
-
outputFolder
Returns the value of theoutputFolderrecord component.- Returns:
- the value of the
outputFolderrecord component
-