Package org.kite9.diagram.builders.krmodel

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


}

  public FieldBuilder showVisibility(PropositionFormat f) {
    for (Tie t : ties) {
        Field m = getRepresented(t);
        NounPart sub = NounFactory.createNewSubjectNounPart(t);
      if (Modifier.isPublic(m.getModifiers())) {
        f.write(sub, JavaRelationships.VISIBILITY, createNoun(new JavaModifier("public")));
      } else if (Modifier.isPrivate(m.getModifiers())) {
        f.write(sub, JavaRelationships.VISIBILITY, createNoun(new JavaModifier("private")));
      } else if (Modifier.isProtected(m.getModifiers())) {
View Full Code Here


  public TypeBuilder withParameters(Filter<? super Type> f) {
    List<Tie> ties2 = new ArrayList<Tie>();
    for (Tie t : ties) {
        Method m = getRepresented(t);
        NounPart subject = NounFactory.createNewSubjectNounPart(t);
      for (Type ty : m.getGenericParameterTypes()) {
          if (f==null || f.accept(ty)) {
        ties2.add(new Tie(subject, JavaRelationships.PARAMETER, createNoun(ty)));
          }
      }
View Full Code Here

  }

  public MethodBuilder showVisibility(PropositionFormat f) {
    for (Tie t : ties) {
        Method m = getRepresented(t);
        NounPart sub = NounFactory.createNewSubjectNounPart(t);
      if (Modifier.isPublic(m.getModifiers())) {
        f.write(sub, JavaRelationships.VISIBILITY, createNoun(new JavaModifier("public")));
      } else if (Modifier.isPrivate(m.getModifiers())) {
        f.write(sub, JavaRelationships.VISIBILITY, createNoun(new JavaModifier("private")));
      } else if (Modifier.isProtected(m.getModifiers())) {
View Full Code Here

    super(forX, model, a);
  }

  public ClassBuilder showVisibility(PropositionFormat f) {
    for (Tie t : ties) {
      NounPart subject = NounFactory.createNewSubjectNounPart(t);
      Class<?> c = getRepresented(t);
      if (Modifier.isPublic(c.getModifiers())) {
        f.write(subject, JavaRelationships.VISIBILITY, createNoun(new JavaModifier("public")));
      } else if (Modifier.isPrivate(c.getModifiers())) {
        f.write(subject, JavaRelationships.VISIBILITY, createNoun(new JavaModifier("private")));
View Full Code Here

  }

  public ClassBuilder showStatic(PropositionFormat f) {
    for (Tie t : ties) {
      Class<?> c = getRepresented(t);
      NounPart subject = NounFactory.createNewSubjectNounPart(t);
      if (c.getEnclosingClass() != null) {
        // inner class
        if (Modifier.isStatic(c.getModifiers())) {
          f.write(subject, JavaRelationships.MODIFIER, createNoun(new JavaModifier("static")));
        }
View Full Code Here

  }

  public ClassBuilder showFinal(PropositionFormat f) {
    for (Tie t : ties) {
      Class<?> c = getRepresented(t);
      NounPart subject = NounFactory.createNewSubjectNounPart(t);
      if (Modifier.isFinal(c.getModifiers())) {
        f.write(subject, JavaRelationships.MODIFIER, createNoun(new JavaModifier("final")));
      }
    }
    return this;
View Full Code Here

  protected <Y> void packContentInner(Collection<Tie> in, Filter<? super Y> f, ClassContentSelector<Y> ccs,
      boolean traverse, Relationship r, List<Tie> out) {
    for (Tie t : in) {
      Class<?> c = getRepresented(t);
      NounPart subject = NounFactory.createNewSubjectNounPart(t);
      if (model.withinModel(MemberHandle.convertClassName(c))) {
        for (Y y : ccs.contents(c)) {
          if ((y!=null) && ((f == null) || (f.accept(y)))) {
            out.add(new Tie(subject, r, createNoun(y)));
          }
View Full Code Here

  public AnnotatedElementBuilder<?> withReferencingAnnotatedElements(Filter<? super Class<? extends Annotation>> f) {
    final ClassLoader cl = getCurrentClassLoader();
    List<Tie> out = new ArrayList<Tie>();
    for (Tie t : ties) {
      Class<?> c = getRepresented(t);
      NounPart subject = NounFactory.createNewSubjectNounPart(t);
      Set<AnnotationHandle> handles = model.getAnnotationReferences(MemberHandle.convertClassName(c));
      for (AnnotationHandle h : handles) {
        AnnotatedElement object = h.getAnnotatedItem().hydrate(cl);
        Annotation relation = h.hydrate(cl);
        if ((f==null) || (f.accept(relation.annotationType()))) {
View Full Code Here

    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

  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

TOP

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

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.