Record Class ModelBuilder.GeneratedModel
java.lang.Object
java.lang.Record
io.micronaut.sourcegen.generator.visitors.ModelBuilder.GeneratedModel
- Record Components:
model- The generated model object defsource- The source of the modelconvertorMethod- The method that converts model to sourcetype- The type of the mode
- Enclosing class:
ModelBuilder
public static record ModelBuilder.GeneratedModel(io.micronaut.sourcegen.model.ObjectDef model, io.micronaut.inject.ast.ClassElement source, io.micronaut.sourcegen.model.MethodDef convertorMethod, io.micronaut.sourcegen.model.TypeDef type)
extends Record
A record for holding the generated model.
-
Constructor Summary
ConstructorsConstructorDescriptionGeneratedModel(io.micronaut.sourcegen.model.ObjectDef model, io.micronaut.inject.ast.ClassElement source, io.micronaut.sourcegen.model.MethodDef convertorMethod, io.micronaut.sourcegen.model.TypeDef type) Creates an instance of aGeneratedModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.sourcegen.model.MethodDefReturns the value of theconvertorMethodrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.io.micronaut.sourcegen.model.ObjectDefmodel()Returns the value of themodelrecord component.io.micronaut.inject.ast.ClassElementsource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.io.micronaut.sourcegen.model.TypeDeftype()Returns the value of thetyperecord component.
-
Constructor Details
-
GeneratedModel
public GeneratedModel(io.micronaut.sourcegen.model.ObjectDef model, io.micronaut.inject.ast.ClassElement source, io.micronaut.sourcegen.model.MethodDef convertorMethod, io.micronaut.sourcegen.model.TypeDef type) Creates an instance of aGeneratedModelrecord class.- Parameters:
model- the value for themodelrecord componentsource- the value for thesourcerecord componentconvertorMethod- the value for theconvertorMethodrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
model
-
source
-
convertorMethod
public io.micronaut.sourcegen.model.MethodDef convertorMethod()Returns the value of theconvertorMethodrecord component.- Returns:
- the value of the
convertorMethodrecord component
-
type
-