Examples of ObjectBuilder


Examples of org.jboss.errai.codegen.builder.impl.ObjectBuilder

        final String varName = InjectUtil.getVarNameFromType(concreteInjectedType, metaParameter);

        final MetaClass depCreationCallbackMC = parameterizedAs(CreationalCallback.class,
            typeParametersOf(concreteInjectedType));

        final ObjectBuilder callback = Stmt.newObject(depCreationCallbackMC)
            .extend().publicOverridesMethod("callback", Parameter.finalOf(concreteInjectedType, "beanValue"))
            .append(Stmt.loadVariable("async").invoke("finish", Refs.get("this"), Refs.get("beanValue")))
            .finish().finish();

        statements.append(Stmt.declareFinalVariable(varName, depCreationCallbackMC, callback));
View Full Code Here

Examples of org.jboss.errai.codegen.builder.impl.ObjectBuilder

      statements.append(stmt);
    }

    ctx.setAttribute(RECEIVING_CALLBACK_ATTRIB, statements);

    final ObjectBuilder finish = statements.finish()
        .publicOverridesMethod("toString")
        .append(Stmt.load(type).invoke("getName").returnValue()).finish()
        .finish();

    processingContext.append(Stmt.declareFinalVariable(callbackVarName, callbackClass, finish));
View Full Code Here

Examples of org.kite9.diagram.builders.java.ObjectBuilder

    return new Diagram(top, null);
  }

  @Kite9Item
  public Diagram example_1_3_FlowChart(DiagramBuilder builder) throws IOException {
    ObjectBuilder checkLaundry = builder.withObjects("Check Laundry Basket").show(builder.asConnectedGlyphs("choice"));
    checkLaundry.withObjects(null, "Is it empty?").show(builder.asTextLines());
    checkLaundry.withObjects(new Relationship("yes", Direction.RIGHT), "All Done!").show(builder.asConnectedGlyphs());

    Relationship no1 = new Relationship("no", Direction.DOWN);
    ObjectBuilder loadLaundry = checkLaundry.withObjects(no1, "Load Laundry Into Machine").show(
        builder.asConnectedGlyphs("action"));
    loadLaundry.withObjects(null, "Ensure machine is empty first", "Add powder, close door", "Start programme")
        .show(builder.asTextLines());

    String finished = "Is Cycle Finished?";
    ObjectBuilder isFinished = loadLaundry.withObjects(new Relationship("wait"), finished).show(
        builder.asConnectedGlyphs("choice"));

    ObjectBuilder waiting = isFinished.withObjects(new Relationship("no"), "Have a Coffee")
        .show(builder.asConnectedGlyphs());

    waiting.withObjects(new Relationship("check again"), finished).show(builder.asConnectedGlyphs());

    Relationship yes = new Relationship("yes");
    ObjectBuilder sunny = isFinished.withObjects(yes, "Is it Sunny?").show(builder.asConnectedGlyphs("choice"));

    sunny.withObjects(new Relationship("it's fine"), "Hang on the Line").show(builder.asConnectedGlyphs("action"));
    sunny.withObjects(new Relationship("it's wet"), "Hang on the Dryer").show(builder.asConnectedGlyphs("action"));

    return builder.getDiagram();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.