Package org.kite9.framework.serialization

Examples of org.kite9.framework.serialization.XMLHelper$ReferenceByNameMarshaller


    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


  @Kite9Item
  public Diagram example_1_8_StateTransition(DiagramBuilder db) throws Exception {
    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

 
  @Kite9Item
  public Diagram example_1_10_SequenceDiagramClasses(DiagramBuilder db) throws Exception {
    Method m = LibraryFacade.class.getDeclaredMethod("borrow", int.class, int.class);
    final String packageLimit = Book.class.getPackage().getName();
    ClassBasedSequenceDiagramDataProvider mbsddp = createClassProvider(db, m, packageLimit);
    ColumnSequenceDiagramWizard format = new ColumnSequenceDiagramWizard(db);
    format.write(mbsddp, db.getDiagram());
    db.withKeyText("BorrowBook", "Exception routes are ommitted for clarity");
    return db.getDiagram();
  }
View Full Code Here

  @Kite9Item
  public Diagram example_1_12_MethodCallDiagramClasses(DiagramBuilder db) throws Exception {
    Method m = LibraryFacade.class.getDeclaredMethod("borrow", int.class, int.class);
    final String packageLimit = Book.class.getPackage().getName();
    ClassBasedSequenceDiagramDataProvider mbsddp = createClassProvider(db, m, packageLimit);
    NoLayoutSequenceDiagramWizard format = new NoLayoutSequenceDiagramWizard(db);
    format.write(mbsddp, db.getDiagram());
    db.withKeyText("BorrowBook", "Exception routes are ommitted for clarity");
    return db.getDiagram();
  }
View Full Code Here

    return db.getDiagram();
  }

  private ClassBasedSequenceDiagramDataProvider createClassProvider(DiagramBuilder db, Method m,
      final String packageLimit) {
    ClassBasedSequenceDiagramDataProvider out =  new ClassBasedSequenceDiagramDataProvider(db, m);
    out.setLimitFilter(
        new Filter<AccessibleObject>() {

          public boolean accept(AccessibleObject o) {
            if ((o instanceof Constructor<?>) || (o instanceof Method)) {
              java.lang.reflect.Member m = (java.lang.reflect.Member) o;
View Full Code Here

  @Kite9Item
  public Diagram example_1_9_SequenceDiagramMethods(DiagramBuilder db) throws Exception {
    Method m = LibraryFacade.class.getDeclaredMethod("borrow", int.class, int.class);
    final String packageLimit = Book.class.getPackage().getName();
    MethodBasedSequenceDiagramDataProvider mbsddp = createMethodProvider(db, m, packageLimit);
    ColumnSequenceDiagramWizard format = new ColumnSequenceDiagramWizard(db);
    format.write(mbsddp, db.getDiagram());
    return db.getDiagram();
  }
View Full Code Here

  @Kite9Item
  public Diagram example_1_10_SequenceDiagramClasses(DiagramBuilder db) throws Exception {
    Method m = LibraryFacade.class.getDeclaredMethod("borrow", int.class, int.class);
    final String packageLimit = Book.class.getPackage().getName();
    ClassBasedSequenceDiagramDataProvider mbsddp = createClassProvider(db, m, packageLimit);
    ColumnSequenceDiagramWizard format = new ColumnSequenceDiagramWizard(db);
    format.write(mbsddp, db.getDiagram());
    db.withKeyText("BorrowBook", "Exception routes are ommitted for clarity");
    return db.getDiagram();
  }
View Full Code Here

  @Kite9Item
  public Diagram example_1_9_SequenceDiagramMethods(DiagramBuilder db) throws Exception {
    Method m = LibraryFacade.class.getDeclaredMethod("borrow", int.class, int.class);
    final String packageLimit = Book.class.getPackage().getName();
    MethodBasedSequenceDiagramDataProvider mbsddp = createMethodProvider(db, m, packageLimit);
    ColumnSequenceDiagramWizard format = new ColumnSequenceDiagramWizard(db);
    format.write(mbsddp, db.getDiagram());
    return db.getDiagram();
  }
View Full Code Here

 
  @Kite9Item
  public Diagram example_1_11_MethodCallDiagramMethods(DiagramBuilder db) throws Exception {
    Method m = LibraryFacade.class.getDeclaredMethod("borrow", int.class, int.class);
    final String packageLimit = Book.class.getPackage().getName();
    MethodBasedSequenceDiagramDataProvider mbsddp = createMethodProvider(db, m, packageLimit);
    NoLayoutSequenceDiagramWizard format = new NoLayoutSequenceDiagramWizard(db);
    format.write(mbsddp, db.getDiagram());
    return db.getDiagram();
  }
View Full Code Here

 
 
 
  private MethodBasedSequenceDiagramDataProvider createMethodProvider(DiagramBuilder db, Method m,
      final String packageLimit) {
    MethodBasedSequenceDiagramDataProvider out = new MethodBasedSequenceDiagramDataProvider(db, m);
    out.setLimitFilter(
        new Filter<AccessibleObject>() {

          public boolean accept(AccessibleObject o) {
            if ((o instanceof Constructor<?>) || (o instanceof Method)) {
              java.lang.reflect.Member m = (java.lang.reflect.Member) o;
View Full Code Here

TOP

Related Classes of org.kite9.framework.serialization.XMLHelper$ReferenceByNameMarshaller

Copyright © 2018 www.massapicom. 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.