Class UMod2java.CompileConstructors

java.lang.Object
eu.bandm.tools.umod.UMod2java.CompileConstructors
Enclosing class:
UMod2java

protected class UMod2java.CompileConstructors extends Object
  • Field Details

  • Constructor Details

    • CompileConstructors

      protected CompileConstructors()
  • Method Details

    • test_0ary_constructor

      protected boolean test_0ary_constructor(UMod.ClassDef cd)
      Returns true immediately if a 0ary constructor is defined by the user explictly (in verbatim Java code), or already implicitly generated by this routine. Otherwise: if there are no obligate fields without initial value, a new 0ary constructor is generated, and "true" returned. Otherwise returns false.
    • process

      protected void process(UMod.Forest model)
    • process

      protected void process(UMod.ClassDef cd)
    • expandOrInherit

      protected void expandOrInherit(UMod.ClassDef cd, Integer key, SortedMap<Integer,UMod.FieldDef> superfields)
    • checkDuplicateConstructor

      protected boolean checkDuplicateConstructor(UMod.ClassDef cd, String signature)
    • makeconstructor

      protected boolean makeconstructor(UMod.ClassDef cd, Integer key, Collection<UMod.FieldDef> inherited, Collection<UMod.FieldDef> newparams)
      Generates a constructor with signature "inherited+newparams".
      Compiles a call to "super()" for the former and assignment statements for the latter().
      ASSUME "Collection" is ordered, since it is "aTreeMap.values()"