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 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
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 themodelrecord component.- Returns:
- the value of the
modelrecord component
-
source
public io.micronaut.inject.ast.ClassElement source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
convertorMethod
public io.micronaut.sourcegen.model.MethodDef convertorMethod()Returns the value of theconvertorMethodrecord component.- Returns:
- the value of the
convertorMethodrecord component
-
type
public io.micronaut.sourcegen.model.TypeDef type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-