Java Class.addRelationship Examples

Java Class.addRelationship - 3 examples found. These are the top rated real world Java examples of Class.addRelationship extracted from open source projects. You can rate examples to help us improve the quality of examples.
  public void moveAssociationClass(
      AssociationClassRelationship association, Class member1, Class member2) {
    association.getMemebersEnd().clear();
    association.getMemebersEnd().add(new MemberEnd("none", null, "public", member1));
    association.getMemebersEnd().add(new MemberEnd("none", null, "public", member2));

    member1.addRelationship(association);
    member2.addRelationship(association);
  }
  public void moveAssociation(AssociationRelationship association, Class class1, Class class2) {
    class1.removeRelationship(association);
    class2.removeRelationship(association);

    association.getParticipants().get(0).setCLSClass(class1);
    association.getParticipants().get(1).setCLSClass(class2);

    class1.addRelationship(association);
    class2.addRelationship(association);
  }
 public void moveDependency(DependencyRelationship dependency, Class client, Class supplier) {
   dependency.setClient(client);
   dependency.setSupplier(supplier);
   client.addRelationship(dependency);
   supplier.addRelationship(dependency);
 }