Esempio n. 1
0
  private Generalization buildGeneralization(
      StringMember classAnnotation, NidMember generalizationAnnotation) {
    LOG.debug("Generalization: ");

    // Source.
    int sourceNid = classAnnotation.getNid();
    Type source = getTypeForNid(sourceNid);
    LOG.debug("    source: " + source.getName());

    // Target.
    int targetNid = generalizationAnnotation.getC1Nid();
    Type target = getTypeForNid(targetNid);
    LOG.debug("    target: " + target.getName());

    return new Generalization(source, target);
  }
Esempio n. 2
0
  private Dependency buildDependency(NidNidStringMember dependencyAnnotation) {
    String name = dependencyAnnotation.getStrValue();
    LOG.debug("Dependency: " + name);

    // Client.
    int clientNid = dependencyAnnotation.getC1Nid();
    Type client = getTypeForNid(clientNid);
    LOG.debug("    client: " + client.getName());

    // Supplier.
    int supplierNid = dependencyAnnotation.getC2Nid();
    Type supplier = getTypeForNid(supplierNid);
    LOG.debug("    supplier: " + supplier.getName());

    return new Dependency(name, client, supplier);
  }