/*
 * Bach - Java Shell Builder
 * Copyright (C) 2020 Christian Stein
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import java.lang.module.ModuleDescriptor.Version;
/** Bach - Java Shell Builder. */
public class Bach {
  /** Version of Bach. */
  public static Version VERSION = Version.parse("11.0-ea");
  /** Main entry-point. */
  public static void main(String... args) {
    Main.main(args);
  }
  // src/de.sormuras.bach/main/java/de/sormuras/bach/Main.java
  /** Bach's main program. */
  static class Main {
    public static void main(String... args) {
      System.out.println("Bach.java " + Bach.VERSION);
      System.out.println(new Project("project").name());
    }
  }
  // src/de.sormuras.bach/main/java/de/sormuras/bach/model/Project.java
  /** Bach's project model. */
  public static final class Project {
    private final String name;
    public Project(String name) {
      this.name = name;
    }
    public String name() {
      return name;
    }
  }
}

@@ -676,16 +676,42 @@
 ersion;%0A
+import java.util.Objects;%0A
 /** Bach
@@ -1158,65 +1158,8 @@
 N);%0A
-      System.out.println(new Project(%22project%22).name());%0A
     
@@ -1332,24 +1332,59 @@
 tring name;%0A
+    private final Version version;%0A
     public P
@@ -1401,16 +1401,33 @@
 ing name
+, Version version
 ) %7B%0A    
@@ -1444,64 +1444,678 @@
 e = 
-name;%0A    %7D%0A    public String name() %7B%0A      return name
+Objects.requireNonNull(name, %22name%22);%0A      this.version = version;%0A    %7D%0A    public String name() %7B%0A      return name;%0A    %7D%0A    public Version version() %7B%0A      return version;%0A    %7D%0A  %7D%0A  // src/de.sormuras.bach/main/java/de/sormuras/bach/model/ProjectBuilder.java%0A  /** Project model builder. */%0A  public static final class ProjectBuilder %7B%0A    private String name;%0A    private Version version;%0A    public ProjectBuilder name(String name) %7B%0A      this.name = name;%0A      return this;%0A    %7D%0A    public ProjectBuilder version(Version version) %7B%0A      this.version = version;%0A      return this;%0A    %7D%0A    public Project build() %7B%0A      return new Project(name, version)
 ;%0A  

Update generated Bach.java