Package org.kite9.diagram.builders.krmodel

Examples of org.kite9.diagram.builders.krmodel.SimpleNoun


   
    return (SimpleNoun) np;
  }
 
  protected SimpleNoun createCallStep(AccessibleObject m2) {
    SimpleNoun np = ensureNoun(m2);
    CallStep out = new CallStep(np, containers.get(np), createCallLabel(m2), null);
      if (out != null)
        steps.add(out);
    return np;
  }
View Full Code Here


  protected SimpleNoun ensureNoun(AccessibleObject m2) {
    Class<?> declaringClass = getDeclaringClass(m2);
    Package declaringPackage = declaringClass.getPackage();
   
    SimpleNoun packageNoun = checkSimpleNoun(declaringPackage, nf.createNoun(declaringPackage));
    if (!groups.contains(packageNoun)) {
      // need to add as a participant
      groups.add(packageNoun);
    }
   
    // now create method noun
    SimpleNoun classNoun = checkSimpleNoun(declaringClass, nf.createNoun(declaringClass));
    containers.put(classNoun, packageNoun);
   
    return classNoun;
   
  }
View Full Code Here

    return (SimpleNoun) np;
  }
 

  protected SimpleNoun createCallStep(AccessibleObject m2) {
    SimpleNoun np = ensureNoun(m2);
    CallStep out = new CallStep(np, containers.get(np), createCallLabel(m2), null);
      if (out != null)
        steps.add(out);
    return np;
  }
View Full Code Here

  protected List<Step> steps = new ArrayList<Step>();
  protected ClassLoader cl;
  protected Aliaser a;

  protected void buildSteps(SimpleNoun caller, AccessibleObject m2) {
    SimpleNoun np = createCallStep(m2);
 
    if (m2 instanceof Method) {
      List<MemberHandle> handles = pm.getCalls(new MethodHandle((Method) m2));

      for (MemberHandle memberHandle : handles) {
View Full Code Here

      stateFormat.returnElement(c, o, db.getInsertionInterface());
    }

    for (Transition t : provider.getTransitions()) {
      if (t != null) {
        SimpleNoun o = t.getTransition();
        DiagramElement body = transitionFormat.returnElement(c, o, db.getInsertionInterface());
     
        for (SimpleNoun from : t.getFromStates()) {
          DiagramElement fromEl = db.getInsertionInterface().returnExisting(from);
          db.getInsertionInterface().returnConnection(fromEl, body, null, null, null, false, null);
View Full Code Here

    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

    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

TOP

Related Classes of org.kite9.diagram.builders.krmodel.SimpleNoun

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.