Examples of EnumWithAnnotationFSMDataProvider


Examples of org.kite9.diagram.builders.wizards.fsm.EnumWithAnnotationFSMDataProvider

    ClassBuilder cb = db.withClasses(Book.class);
    cb.show(db.asConnectedContexts());
    Context c = (Context) db.getNounElement(Book.class);
    FiniteStateMachineWizard fsmFormat = new FiniteStateMachineWizard(db, c);
    Field f = Book.class.getDeclaredField("state");
    FSMDataProvider provider = new EnumWithAnnotationFSMDataProvider(db, f, BookState.class, BeforeState.class,
        AfterState.class);
    fsmFormat.write(provider);

    return db.getDiagram();
  }
View Full Code Here

Examples of org.kite9.diagram.builders.wizards.fsm.EnumWithAnnotationFSMDataProvider

  @Kite9Item
  public void test_15_1_CreateFSMModel() throws Exception {
    DiagramBuilder db = createBuilder();
    FiniteStateMachineWizard fsmf = new FiniteStateMachineWizard(db, null);
    Field f = StateMovingClass.class.getDeclaredField("current");
    EnumWithAnnotationFSMDataProvider provider
      = new EnumWithAnnotationFSMDataProvider(db.getNounFactory(), db.getProjectModel(), f , State.class, State.class.getClassLoader(), BeforeState.class, "value", AfterState.class, "value");
    fsmf.write(provider);
    renderDiagram(db.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.