Record Class GenerateSimpleRecordTask

java.lang.Object
java.lang.Record
io.micronaut.sourcegen.example.plugin.GenerateSimpleRecordTask
Record Components:
typeName - The generated class name
version - The version
packageName - The package name
properties - The properties
javadoc - The javadoc
outputFolder - 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 Details

    • GenerateSimpleRecordTask

      public GenerateSimpleRecordTask(String typeName, Integer version, String packageName, Map<String,String> properties, List<String> javadoc, File outputFolder)
      Creates an instance of a GenerateSimpleRecordTask record class.
      Parameters:
      typeName - the value for the typeName record component
      version - the value for the version record component
      packageName - the value for the packageName record component
      properties - the value for the properties record component
      javadoc - the value for the javadoc record component
      outputFolder - the value for the outputFolder record component
  • Method Details

    • generateSimpleRecord

      @PluginTaskExecutable public void 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • typeName

      public String typeName()
      Returns the value of the typeName record component.
      Returns:
      the value of the typeName record component
    • version

      public Integer version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • packageName

      public String packageName()
      Returns the value of the packageName record component.
      Returns:
      the value of the packageName record component
    • properties

      public Map<String,String> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • javadoc

      public List<String> javadoc()
      Returns the value of the javadoc record component.
      Returns:
      the value of the javadoc record component
    • outputFolder

      public File outputFolder()
      Returns the value of the outputFolder record component.
      Returns:
      the value of the outputFolder record component