Examples of NounPart


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

    List<List<Class<?>>> sortedClasses = sortClassesByLevel();
    // create the containers
    int i = 1;
    for (List<Class<?>> list : sortedClasses) {
      String name = "level " + i++;
      NounPart containerNoun = getNoun(name);
      containerFormat.write(getNoun(container), JavaRelationships.CLASS_GROUP, containerNoun);
      hierarchyContainers.add(db.getInsertionInterface().returnExisting(containerNoun));
      for (Class<?> class1 : list) {
        classFormat.write(containerNoun, JavaRelationships.CLASS, getNoun(class1));
      }
View Full Code Here

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

  public ClassLoader getCurrentClassLoader() {
    return Thread.currentThread().getContextClassLoader();
  }

  public DiagramElement getNounElement(Object o) {
    NounPart np = getNounFactory().createNoun(o);
    return contents.get(np);
  }
View Full Code Here

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

    public ClassBuilder withMemberClasses(Filter<? super Class<?>> f) {
  List<Tie> ties2 = new ArrayList<Tie>(10);
  final ClassLoader cl = Thread.currentThread().getContextClassLoader();

  for (Tie t : ties) {
      NounPart sub = NounFactory.createNewSubjectNounPart(t);
      Package p = getRepresented(t);
      Set<String> classNames = model.getClassesInPackage(MemberHandle.convertPackageName(p));
      for (Class<?> c : MemberHandle.hydrateClasses(classNames, cl)) {
    if ((f==null) || (f.accept(c))) {
        ties2.add(new Tie(sub, JavaRelationships.CLASS, createNoun(c)));
View Full Code Here

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

    public PackageBuilder withDependencies(Filter<? super Package> f) {
      List<Tie> ties2 = new ArrayList<Tie>(10);
      final ClassLoader cl = Thread.currentThread().getContextClassLoader();

      for (Tie t : ties) {
          NounPart sub = NounFactory.createNewSubjectNounPart(t);
          Package p = getRepresented(t);
          Set<PackageHandle> packNames = model.getDependsOnPackages(new PackageHandle(MemberHandle.convertPackageName(p), null));
          for (Package p2 : MemberHandle.hydratePackages(packNames, cl)) {
        if ((f==null) || (f.accept(p2))) {
            ties2.add(new Tie(sub, JavaRelationships.REQUIRES, createNoun(p2)));
View Full Code Here

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

  public AnnotationBuilder withAnnotations(Filter<? super Annotation> f) {
    List<Tie> annotations = new ArrayList<Tie>();
    for (Tie t : ties) {
      X anEl = (X) t.getObject().getRepresented();
      Annotation[] anns = anEl.getAnnotations();
      NounPart subject = NounFactory.createNewSubjectNounPart(t);
      for (Annotation annotation : anns) {
        if ((f == null) || (f.accept(annotation))) {
          NounPart object = createNoun(annotation);
          annotations.add(new Tie(subject, JavaRelationships.ANNOTATION, object));
        }
      }
    }
View Full Code Here

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

    classBuilder.withFields(new Filter<Field>() {

      public boolean accept(Field o) {
        if ((fieldRelationshipFilter==null) || (fieldRelationshipFilter.accept(o))) {
          NounPart np = db.createNoun(o.getGenericType());

          return (db.isOnDiagram(np.getRepresented()));
        } else {
          return false;
        }
      }
View Full Code Here

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

    // show any other fields too
    classBuilder.withFields(new Filter<Field>() {

      public boolean accept(Field o) {
        if ((fieldAttributeFilter==null) || (fieldAttributeFilter.accept(o))) {
          NounPart np = db.createNoun(o.getGenericType());
          return (!db.isOnDiagram(np.getRepresented()));
        } else {
          return false;
        }
      }
View Full Code Here

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

    // show any other fields too
    classBuilder.withMethods(new Filter<Method>() {

      public boolean accept(Method o) {
        if ((methodAttributeFilter==null) || (methodAttributeFilter.accept(o))) {
          NounPart np = db.createNoun(o.getGenericReturnType());
          return (!db.isOnDiagram(np.getRepresented()));
        } else {
          return false;
        }
      }
View Full Code Here

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

//      throw new Kite9ProcessingException("No annotation for: "+m.getName()+ ", on member="+m+" annotation="+annotation.getName()+", field="+field+".  Is retention set to RUNTIME?");
    }
   
    SimpleNoun[] out = new SimpleNoun[df.length];
    for (int i = 0; i < out.length; i++) {
      NounPart np = nf.createNoun(df[i]);
      out[i] = checkSimpleNoun(np);
    }

    return out;
  }
View Full Code Here

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

      throw new Kite9ProcessingException("Could not get annotation values for " + m + " with field " + field, e);
    }
  }

  protected SimpleNoun getTransitionObject(Object m) {
    NounPart np = nf.createNoun(m);
    return checkSimpleNoun(np);
  }
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.