Record Class ModelUtils.GeneratedModel
java.lang.Object
java.lang.Record
io.micronaut.sourcegen.generator.visitors.ModelUtils.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:
- ModelUtils
public static record ModelUtils.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 aGeneratedModel
record class. -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.sourcegen.model.MethodDef
Returns the value of theconvertorMethod
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.io.micronaut.sourcegen.model.ObjectDef
model()
Returns the value of themodel
record component.io.micronaut.inject.ast.ClassElement
source()
Returns the value of thesource
record component.final String
toString()
Returns a string representation of this record class.io.micronaut.sourcegen.model.TypeDef
type()
Returns the value of thetype
record 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 aGeneratedModel
record class.- Parameters:
model
- the value for themodel
record componentsource
- the value for thesource
record componentconvertorMethod
- the value for theconvertorMethod
record componenttype
- the value for thetype
record component
-
-
Method Details
-
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)
. -
model
public io.micronaut.sourcegen.model.ObjectDef model()Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-
source
public io.micronaut.inject.ast.ClassElement source()Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
convertorMethod
public io.micronaut.sourcegen.model.MethodDef convertorMethod()Returns the value of theconvertorMethod
record component.- Returns:
- the value of the
convertorMethod
record component
-
type
public io.micronaut.sourcegen.model.TypeDef type()Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-