Record Class DefaultFactoryDef
java.lang.Object
java.lang.Record
io.micronaut.python.processing.model.DefaultFactoryDef
- Record Components:
name- The factory function name as written, for examplelistordataclasses.field
The default of a dataclass field declared through
field(default_factory=...): the factory is called
by Python for every instance, so the default is not a value the generated code can reproduce. Only the
builtin list, dict and set factories are recognised as the empty collection.- Since:
- 5.2.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultFactoryDef(String name) Creates an instance of aDefaultFactoryDefrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanname()Returns the value of thenamerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
DefaultFactoryDef
-
-
Method Details
-
isBuiltin
- Parameters:
builtin- A builtin factory name (list,dict,set)- Returns:
- Whether the factory is that builtin, possibly qualified
-
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). -
name
-