All Downloads are FREE. Search and download functionalities are using the official Maven repository.

samplegenerators.Generator_Doer Maven / Gradle / Ivy

There is a newer version: 2.10.1
Show newest version
package samplegenerators;

import static org.immutables.generator.Intrinsics.*;

@java.lang.SuppressWarnings("all")
public class Generator_Doer extends samplegenerators.Doer {
public org.immutables.generator.Templates.Invokable main() { return main; }
private final org.immutables.generator.Templates.Invokable main = new FragmentDispatch(0, 0);
void _t0__main(org.immutables.generator.Templates.Invokation __) {
  __.dl();__.ln();
  {final org.immutables.generator.Templates.Iteration _it1 = new org.immutables.generator.Templates.Iteration();
  for (final javax.lang.model.element.Element e : $in(elements())) {
  final javax.lang.model.element.TypeElement t = $cast(e);
  final javax.lang.model.element.PackageElement p = $cast(t.getEnclosingElement());
  __.dl();__.ln();
    final org.immutables.generator.Templates.Invokable x = new org.immutables.generator.Templates.Fragment(0) {
    @Override public void run(org.immutables.generator.Templates.Invokation __) {
      __.dl();final org.immutables.generator.Templates.Invokable x = this;
      __.out("Es");
      $(__, e.getSimpleName());
      __.dl();
    }};__.dl();__.ln();
    $(__, output.java, p.getQualifiedName(), x, new org.immutables.generator.Templates.Fragment(0) {
    @Override public void run(org.immutables.generator.Templates.Invokation __) {
      __.dl();__.ln();
      __.out("package ");
      $(__, p.getQualifiedName());
      __.out(";").ln();
      __.out("abstract class ");
      $(__, x);
      __.out(" implements java.lang.Iterable{").ln();
      __.out("  private ");
      $(__, x);
      __.out("() {}").ln();
      __.out("  ");
      $(__, members);
      __.ln();
      __.ln();
      __.out("  ");
      $(__, other);
      __.ln();
      __.out("  ");
      $(__, other);
      __.ln();
      $(__, other);
      __.ln();
      __.out("}").ln();
      __.dl();
    }});
    __.ln();
    __.dl();_it1.index++;
    _it1.first = false;
  }}
  __.dl();__.ln();
  __.dl();
};

org.immutables.generator.Templates.Invokable members() { return members; }
private final org.immutables.generator.Templates.Invokable members = new FragmentDispatch(0, 1);
void _t1__members(org.immutables.generator.Templates.Invokation __) {
  __.dl();__.ln();
  __.out("// No members").ln();
  __.dl();
};

org.immutables.generator.Templates.Invokable unless() { return unless; }
private final org.immutables.generator.Templates.Invokable unless = new FragmentDispatch(2, 2);
void _t2__unless(org.immutables.generator.Templates.Invokation __) {
  __.dl();final java.lang.Object value = __.param(0);
  final org.immutables.generator.Templates.Invokable body = $cast(__.param(1));
  __.dl();
  if ($if($(not, value))) {
    __.dl();$(__, body);
    
  }
  __.dl();__.dl();
};

org.immutables.generator.Templates.Invokable other() { return other; }
private final org.immutables.generator.Templates.Invokable other = new FragmentDispatch(0, 3);
void _t3__other(org.immutables.generator.Templates.Invokation __) {
  __.dl();__.ln();
  __.out("  /* no other").ln();
  __.out("  ");
  $(__, "[]");
  $(__, "<>");
  $(__, not, "x");
  __.ln();
  __.out("  ");
  {final org.immutables.generator.Templates.Iteration _it1 = new org.immutables.generator.Templates.Iteration();
  for (final java.lang.Integer i : $in(range())) {
  __.dl();{final java.lang.Object value_unless_1116728500 = $cast(_it1.first);
    final org.immutables.generator.Templates.Invokable body_unless_1116728500 = new org.immutables.generator.Templates.Fragment(0) {
      @Override public void run(org.immutables.generator.Templates.Invokation __) {
        __.dl();final org.immutables.generator.Templates.Invokable body_unless_1116728500 = this;
        __.out(",");
        __.dl();
      }};__.dl();__.dl();
      if ($if($(not, value_unless_1116728500))) {
        __.dl();$(__, body_unless_1116728500);
        
      }
      __.dl();
    }
    __.ln();
    __.out("    ");
    $(__, i);
    __.ln();
    __.out("  ");
    __.dl();_it1.index++;
    _it1.first = false;
  }}
  __.dl();__.ln();
  __.out("  // heres other").ln();
  __.out("  ");
  {final org.immutables.generator.Templates.Iteration _it1 = new org.immutables.generator.Templates.Iteration();
  for (final java.lang.Integer i : $in(range())) {
  __.dl();__.ln();
    __.out("    xx");
    $(__, i);
    __.out("xx").ln();
    __.out("  ");
    __.dl();_it1.index++;
    _it1.first = false;
  }}
  __.dl();__.ln();
  __.out("    */").ln();
  __.dl();
};
private class FragmentDispatch extends org.immutables.generator.Templates.Fragment{
private final int index;
FragmentDispatch(int arity, int index){
super(arity);
this.index = index;
}
@Override public void run(org.immutables.generator.Templates.Invokation invokation){
  switch (index){
  case 0: _t0__main(invokation); break;
  case 1: _t1__members(invokation); break;
  case 2: _t2__unless(invokation); break;
  case 3: _t3__other(invokation); break;
  default: break;
}}}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy