Exemplo n.º 1
0
  public ArrayList<UMLClass> getAllExtendsOrImplements() {
    ArrayList<UMLClass> finalList = new ArrayList<UMLClass>();
    ArrayList<UMLClass> extendsOrImplements = new ArrayList<UMLClass>();

    for (UMLArrow arrow : this.arrows) {
      if (arrow.extendsOrImplements()) {
        extendsOrImplements.add(arrow.getEndClass());
      }
    }

    for (UMLClass uClass : extendsOrImplements) {
      finalList.addAll(uClass.getAllExtendsOrImplementsHelper());
    }

    return finalList;
  }
Exemplo n.º 2
0
  private ArrayList<UMLClass> getAllExtendsOrImplementsHelper() {
    ArrayList<UMLClass> finalList = new ArrayList<UMLClass>();
    ArrayList<UMLClass> extendsOrImplements = new ArrayList<UMLClass>();

    for (UMLArrow arrow : this.arrows) {
      if (arrow.extendsOrImplements()) {
        extendsOrImplements.add(arrow.getEndClass());
      }
    }

    for (UMLClass uClass : extendsOrImplements) {
      ArrayList<UMLClass> temp = uClass.getAllExtendsOrImplementsHelper();
      for (UMLClass uClass2 : temp) {
        if (!finalList.contains(uClass2)) {
          finalList.add(uClass2);
        }
      }
    }

    finalList.add(this);
    return finalList;
  }