-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 0.7.0 - another model revision
- Loading branch information
Showing
54 changed files
with
2,312 additions
and
2,173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package tscfg.example; | ||
|
||
public class JCfg { | ||
public final java.lang.Long durHr; | ||
public final java.lang.String foo; | ||
public final java.lang.String optStr; | ||
public final java.util.List<java.util.List<JCfg.$_E1>> positions; | ||
public static class $_E1 { | ||
public final java.util.List<java.lang.Boolean> attrs; | ||
public final double lat; | ||
public final double lon; | ||
|
||
public $_E1(com.typesafe.config.Config c) { | ||
this.attrs = c.hasPathOrNull("attrs") ? $_L$_bln(c.getList("attrs")) : null; | ||
this.lat = c.hasPathOrNull("lat") ? c.getDouble("lat") : 35.1; | ||
this.lon = c.getDouble("lon"); | ||
} | ||
} | ||
|
||
public JCfg(com.typesafe.config.Config c) { | ||
this.durHr = c.hasPathOrNull("durHr") ? c.getDuration("durHr", java.util.concurrent.TimeUnit.HOURS) : null; | ||
this.foo = c.hasPathOrNull("foo") ? c.getString("foo") : "foo \"val\" etc "; | ||
this.optStr = c.hasPathOrNull("optStr") ? c.getString("optStr") : null; | ||
this.positions = $_L$_LJCfg_$_E1(c.getList("positions")); | ||
} | ||
private static java.util.List<java.util.List<JCfg.$_E1>> $_L$_LJCfg_$_E1(com.typesafe.config.ConfigList cl) { | ||
java.util.ArrayList<java.util.List<JCfg.$_E1>> al = new java.util.ArrayList<>(); | ||
for (com.typesafe.config.ConfigValue cv: cl) { | ||
al.add($_LJCfg_$_E1((com.typesafe.config.ConfigList)cv)); | ||
} | ||
return java.util.Collections.unmodifiableList(al); | ||
} | ||
private static java.util.List<JCfg.$_E1> $_LJCfg_$_E1(com.typesafe.config.ConfigList cl) { | ||
java.util.ArrayList<JCfg.$_E1> al = new java.util.ArrayList<>(); | ||
for (com.typesafe.config.ConfigValue cv: cl) { | ||
al.add(new JCfg.$_E1(((com.typesafe.config.ConfigObject)cv).toConfig())); | ||
} | ||
return java.util.Collections.unmodifiableList(al); | ||
} | ||
|
||
private static java.util.List<java.lang.Boolean> $_L$_bln(com.typesafe.config.ConfigList cl) { | ||
java.util.ArrayList<java.lang.Boolean> al = new java.util.ArrayList<>(); | ||
for (com.typesafe.config.ConfigValue cv: cl) { | ||
al.add($_bln(cv)); | ||
} | ||
return java.util.Collections.unmodifiableList(al); | ||
} | ||
private static java.lang.Boolean $_bln(com.typesafe.config.ConfigValue cv) { | ||
java.lang.Object u = cv.unwrapped(); | ||
if (cv.valueType() != com.typesafe.config.ConfigValueType.BOOLEAN || | ||
!(u instanceof java.lang.Boolean)) throw $_expE(cv, "boolean"); | ||
return (java.lang.Boolean) u; | ||
} | ||
private static java.lang.RuntimeException $_expE(com.typesafe.config.ConfigValue cv, java.lang.String exp) { | ||
java.lang.Object u = cv.unwrapped(); | ||
return new java.lang.RuntimeException(cv.origin().lineNumber() | ||
+ ": expecting: " +exp + " got: " + (u instanceof java.lang.String ? "\"" +u+ "\"" : u)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,42 @@ | ||
package tscfg.example; | ||
|
||
public class JavaIssue10Cfg { | ||
public final Main main; | ||
|
||
public final JavaIssue10Cfg.Main main; | ||
public static class Main { | ||
public final Email email; | ||
public final java.util.List<Reals$Elm> reals; | ||
|
||
public final Main.Email email; | ||
public final java.util.List<Main.Reals$Elm> reals; | ||
public static class Email { | ||
public final java.lang.String password; | ||
public final java.lang.String server; | ||
|
||
public Email(com.typesafe.config.Config c) { | ||
this.password = c.getString("password"); | ||
this.server = c.getString("server"); | ||
} | ||
} | ||
|
||
public static class Reals$Elm { | ||
public final double foo; | ||
|
||
public Reals$Elm(com.typesafe.config.Config c) { | ||
this.foo = c.getDouble("foo"); | ||
} | ||
} | ||
|
||
|
||
|
||
public Main(com.typesafe.config.Config c) { | ||
this.email = c.hasPathOrNull("email") ? new Email(_$config(c, "email")) : null; | ||
this.reals = c.hasPathOrNull("reals") ? $listReals$Elm(c.getList("reals")) : null; | ||
this.email = c.hasPathOrNull("email") ? new Main.Email(c.getConfig("email")) : null; | ||
this.reals = c.hasPathOrNull("reals") ? $_LMain_Reals$Elm(c.getList("reals")) : null; | ||
} | ||
|
||
private static java.util.List<Reals$Elm> $listReals$Elm(com.typesafe.config.ConfigList cl) { | ||
java.util.ArrayList<Reals$Elm> al = new java.util.ArrayList<>(); | ||
private static java.util.List<Main.Reals$Elm> $_LMain_Reals$Elm(com.typesafe.config.ConfigList cl) { | ||
java.util.ArrayList<Main.Reals$Elm> al = new java.util.ArrayList<>(); | ||
for (com.typesafe.config.ConfigValue cv: cl) { | ||
al.add(new Reals$Elm(((com.typesafe.config.ConfigObject)cv).toConfig())); | ||
al.add(new Main.Reals$Elm(((com.typesafe.config.ConfigObject)cv).toConfig())); | ||
} | ||
return java.util.Collections.unmodifiableList(al); | ||
} | ||
} | ||
|
||
public JavaIssue10Cfg(com.typesafe.config.Config c) { | ||
this.main = new Main(_$config(c, "main")); | ||
} | ||
|
||
private static com.typesafe.config.Config _$config(com.typesafe.config.Config c, java.lang.String path) { | ||
return c.hasPathOrNull(path) ? c.getConfig(path) : null; | ||
this.main = new JavaIssue10Cfg.Main(c.getConfig("main")); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,46 @@ | ||
package tscfg.example; | ||
|
||
public class JavaIssue12Cfg { | ||
public final Boolean Boolean; | ||
public final Option Option; | ||
public final String String; | ||
public final Int_ int_; | ||
|
||
public final JavaIssue12Cfg.Boolean Boolean; | ||
public final JavaIssue12Cfg.Option Option; | ||
public final JavaIssue12Cfg.String String; | ||
public final JavaIssue12Cfg.Int_ int_; | ||
public static class Boolean { | ||
public final java.lang.String bar; | ||
|
||
public Boolean(com.typesafe.config.Config c) { | ||
this.bar = c.getString("bar"); | ||
this.bar = c.hasPathOrNull("bar") ? c.getString("bar") : "foo"; | ||
} | ||
} | ||
|
||
public static class Option { | ||
public final java.lang.String bar; | ||
|
||
public Option(com.typesafe.config.Config c) { | ||
this.bar = c.getString("bar"); | ||
this.bar = c.hasPathOrNull("bar") ? c.getString("bar") : "baz"; | ||
} | ||
} | ||
|
||
public static class String { | ||
public final java.lang.String bar; | ||
|
||
public String(com.typesafe.config.Config c) { | ||
this.bar = c.getString("bar"); | ||
this.bar = c.hasPathOrNull("bar") ? c.getString("bar") : "baz"; | ||
} | ||
} | ||
|
||
public static class Int_ { | ||
public final int bar; | ||
|
||
public final java.lang.Integer bar; | ||
public Int_(com.typesafe.config.Config c) { | ||
this.bar = c.getInt("bar"); | ||
this.bar = c.hasPathOrNull("bar") ? c.getInt("bar") : 1; | ||
} | ||
} | ||
|
||
public JavaIssue12Cfg(com.typesafe.config.Config c) { | ||
this.Boolean = new Boolean(_$config(c, "Boolean")); | ||
this.Option = new Option(_$config(c, "Option")); | ||
this.String = new String(_$config(c, "String")); | ||
this.int_ = new Int_(_$config(c, "int")); | ||
} | ||
|
||
private static com.typesafe.config.Config _$config(com.typesafe.config.Config c, java.lang.String path) { | ||
return c.hasPathOrNull(path) ? c.getConfig(path) : null; | ||
this.Boolean = new JavaIssue12Cfg.Boolean(c.getConfig("Boolean")); | ||
this.Option = new JavaIssue12Cfg.Option(c.getConfig("Option")); | ||
this.String = new JavaIssue12Cfg.String(c.getConfig("String")); | ||
this.int_ = new JavaIssue12Cfg.Int_(c.getConfig("int")); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
package tscfg.example; | ||
|
||
public class JavaIssue13Cfg { | ||
public final Issue issue; | ||
|
||
public final JavaIssue13Cfg.Issue issue; | ||
public static class Issue { | ||
public final java.lang.String optionalFoo; | ||
|
||
public Issue(com.typesafe.config.Config c) { | ||
this.optionalFoo = c.hasPathOrNull("optionalFoo") ? c.getString("optionalFoo") : null; | ||
} | ||
} | ||
|
||
public JavaIssue13Cfg(com.typesafe.config.Config c) { | ||
this.issue = new Issue(_$config(c, "issue")); | ||
} | ||
|
||
private static com.typesafe.config.Config _$config(com.typesafe.config.Config c, java.lang.String path) { | ||
return c.hasPathOrNull(path) ? c.getConfig(path) : null; | ||
this.issue = new JavaIssue13Cfg.Issue(c.getConfig("issue")); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,18 @@ | ||
package tscfg.example; | ||
|
||
public class JavaIssue14Cfg { | ||
public final _0 _0; | ||
public final JavaIssue14Cfg._0 _0; | ||
public final java.lang.String _2; | ||
|
||
public static class _0 { | ||
public final java.lang.String _1; | ||
|
||
public _0(com.typesafe.config.Config c) { | ||
this._1 = c.getString("1"); | ||
this._1 = c.hasPathOrNull("1") ? c.getString("1") : "bar"; | ||
} | ||
} | ||
|
||
public JavaIssue14Cfg(com.typesafe.config.Config c) { | ||
this._0 = new _0(_$config(c, "0")); | ||
this._2 = c.getString("2"); | ||
} | ||
|
||
private static com.typesafe.config.Config _$config(com.typesafe.config.Config c, java.lang.String path) { | ||
return c.hasPathOrNull(path) ? c.getConfig(path) : null; | ||
this._0 = new JavaIssue14Cfg._0(c.getConfig("0")); | ||
this._2 = c.hasPathOrNull("2") ? c.getString("2") : "foo"; | ||
} | ||
} | ||
|
Oops, something went wrong.