Class FormModelWriter

java.lang.Object
com.vaadin.hilla.generator.typescript.FormModelWriter

public final class FormModelWriter extends Object
Writes the model a form binds a type through, which is what tells a field which property it edits and what the value of it has to be.

The model of a type is a constant built with the model library: a model of an object with a property per property of the type, holding the model of the value of that property, or a model of an enum. A type alias of the same name goes with the constant, so that the default export can be used both as a value and as a type. The property saying which subtype a value of a polymorphic type is goes last, pinned to the ids the type accepts.

  • Field Details

    • SUFFIX

      public static final String SUFFIX
      The suffix both the file and the constant of a model go by, on top of the name of the type the model is of.
      See Also:
  • Constructor Details

    • FormModelWriter

      public FormModelWriter(List<EntityModel> entities)
      Parameters:
      entities - every type a model is written for in the same run, which decides the references between the models that have to be read lazily
  • Method Details