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 boolean
Indicates whether some other object is "equal to" this one.void
Generate a simple record in the supplied package and with the specified version.final int
hashCode()
Returns a hash code value for this object.javadoc()
Returns the value of thejavadoc
record component.Returns the value of theoutputFolder
record component.Returns the value of thepackageName
record component.Returns the value of theproperties
record component.final String
toString()
Returns a string representation of this record class.typeName()
Returns the value of thetypeName
record component.version()
Returns the value of theversion
record 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 aGenerateSimpleRecordTask
record class.- Parameters:
typeName
- the value for thetypeName
record componentversion
- the value for theversion
record componentpackageName
- the value for thepackageName
record componentproperties
- the value for theproperties
record componentjavadoc
- the value for thejavadoc
record componentoutputFolder
- the value for theoutputFolder
record 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 thetypeName
record component.- Returns:
- the value of the
typeName
record component
-
version
Returns the value of theversion
record component.- Returns:
- the value of the
version
record component
-
packageName
Returns the value of thepackageName
record component.- Returns:
- the value of the
packageName
record component
-
properties
Returns the value of theproperties
record component.- Returns:
- the value of the
properties
record component
-
javadoc
Returns the value of thejavadoc
record component.- Returns:
- the value of the
javadoc
record component
-
outputFolder
Returns the value of theoutputFolder
record component.- Returns:
- the value of the
outputFolder
record component
-