Class ObjectHelper
java.lang.Object
io.micronaut.python.processing.util.ObjectHelper
Generates Object method implementations (toString, equals, hashCode)
for generated POJOs that mirror Python introspected beans.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddObjectMethods(io.micronaut.sourcegen.model.ClassDef.ClassDefBuilder classDefBuilder, io.micronaut.sourcegen.model.ClassTypeDef selfType, List<PropertyElement> properties, Map<String, io.micronaut.sourcegen.model.FieldDef> propertyFields) Adds toString, equals and hashCode methods to the given class builder.
-
Method Details
-
addObjectMethods
public static void addObjectMethods(io.micronaut.sourcegen.model.ClassDef.ClassDefBuilder classDefBuilder, io.micronaut.sourcegen.model.ClassTypeDef selfType, List<PropertyElement> properties, Map<String, io.micronaut.sourcegen.model.FieldDef> propertyFields) Adds toString, equals and hashCode methods to the given class builder. Only readable (non write-only) properties are considered.- Parameters:
classDefBuilder- the builder of the generated classselfType- the type of the generated classproperties- all bean properties of the source elementpropertyFields- map from property name to backing FieldDef in the generated class
-