Examples of IRelationship


Examples of org.aspectj.asm.IRelationship

    if (targetHandle == null) {
      return;
    }

    IRelationshipMap mapper = model.getRelationshipMap();
    IRelationship foreward = mapper.get(sourceHandle, IRelationship.Kind.DECLARE_INTER_TYPE, ANNOTATES, false, true);
    foreward.addTarget(targetHandle);

    IRelationship back = mapper.get(targetHandle, IRelationship.Kind.DECLARE_INTER_TYPE, ANNOTATED_BY, false, true);
    back.addTarget(sourceHandle);
    if (sourceNode.getSourceLocation() != null) {
      model.addAspectInEffectThisBuild(sourceNode.getSourceLocation().getSourceFile());
    }
  }
View Full Code Here

Examples of org.aspectj.asm.IRelationship

      if (adviceElement != null) {
        adviceElement.setExtraInfo(extra);
      }
      String targetHandle = targetNode.getHandleIdentifier();
      if (advice.getKind().equals(AdviceKind.Softener)) {
        IRelationship foreward = mapper.get(adviceHandle, IRelationship.Kind.DECLARE_SOFT, SOFTENS, runtimeTest, true);
        if (foreward != null) {
          foreward.addTarget(targetHandle);
        }

        IRelationship back = mapper.get(targetHandle, IRelationship.Kind.DECLARE, SOFTENED_BY, runtimeTest, true);
        if (back != null) {
          back.addTarget(adviceHandle);
        }
      } else {
        IRelationship foreward = mapper.get(adviceHandle, IRelationship.Kind.ADVICE, ADVISES, runtimeTest, true);
        if (foreward != null) {
          foreward.addTarget(targetHandle);
        }

        IRelationship back = mapper.get(targetHandle, IRelationship.Kind.ADVICE, ADVISED_BY, runtimeTest, true);
        if (back != null) {
          back.addTarget(adviceHandle);
        }
      }
      if (adviceElement.getSourceLocation() != null) {
        model.addAspectInEffectThisBuild(adviceElement.getSourceLocation().getSourceFile());
      }
View Full Code Here

Examples of org.aspectj.asm.IRelationship

      if (sourceHandle == null) {
        return;
      }

      IRelationshipMap mapper = model.getRelationshipMap();
      IRelationship foreward = mapper.get(sourceHandle, IRelationship.Kind.DECLARE_INTER_TYPE, ANNOTATES, false, true);
      foreward.addTarget(targetHandle);

      IRelationship back = mapper.get(targetHandle, IRelationship.Kind.DECLARE_INTER_TYPE, ANNOTATED_BY, false, true);
      back.addTarget(sourceHandle);
    } catch (Throwable t) { // I'm worried about that code above, this will
      // make sure we don't explode if it plays up
      t.printStackTrace(); // I know I know .. but I don't want to lose
      // it!
    }
View Full Code Here

Examples of org.aspectj.asm.IRelationship

    if (sourceHandle == null) {
      return;
    }

    IRelationshipMap relmap = model.getRelationshipMap();
    IRelationship foreward = relmap.get(sourceHandle, IRelationship.Kind.DECLARE_INTER_TYPE, ANNOTATES, false, true);
    foreward.addTarget(targetHandle);
    IRelationship back = relmap.get(targetHandle, IRelationship.Kind.DECLARE_INTER_TYPE, ANNOTATED_BY, false, true);
    back.addTarget(sourceHandle);
  }
View Full Code Here

Examples of org.aspectj.asm.IRelationship

        onType.getSourceLocation().getColumn(),
        onType.getSourceLocation().getOffset());
       
      IRelationshipMap mapper = AsmManager.getDefault().getRelationshipMap();
      if (sourceHandle != null && targetHandle != null) {
        IRelationship foreward = mapper.get(sourceHandle, IRelationship.Kind.DECLARE_INTER_TYPE, INTER_TYPE_DECLARES,false,true);
        foreward.addTarget(targetHandle);
       
        IRelationship back = mapper.get(targetHandle, IRelationship.Kind.DECLARE_INTER_TYPE, INTER_TYPE_DECLARED_BY,false,true);
        back.addTarget(sourceHandle);
      }
    }
  }
View Full Code Here

Examples of org.aspectj.asm.IRelationship

  public static List/*IProgramElement*/ getTargets(IProgramElement node, IRelationship.Kind kind) {
      List relations = AsmManager.getDefault().getRelationshipMap().get(node);
    List targets = null;
      if (relations == null) return null;
    for (Iterator it = relations.iterator(); it.hasNext(); ) {
          IRelationship rtn = (IRelationship)it.next();
          if (rtn.getKind().equals(kind)) {
            targets = rtn.getTargets();
          }
       }
    return targets;
  }
View Full Code Here

Examples of org.aspectj.asm.IRelationship

  public static List/*IProgramElement*/ getDeclareTargets(IProgramElement node) {
      List relations = AsmManager.getDefault().getRelationshipMap().get(node);
    List targets = null;
      if (relations == null) return null;
    for (Iterator it = relations.iterator(); it.hasNext(); ) {
          IRelationship rtn = (IRelationship)it.next();
          if (rtn.getKind().isDeclareKind()) {
            targets = rtn.getTargets();
          }
       }
    return targets;
  }
View Full Code Here

Examples of org.aspectj.asm.IRelationship

      shadow.getSourceLocation().getColumn(),
      shadow.getSourceLocation().getOffset());

    IRelationshipMap mapper = AsmManager.getDefault().getRelationshipMap();
    if (sourceHandle != null && targetHandle != null) {
      IRelationship foreward = mapper.get(sourceHandle, IRelationship.Kind.DECLARE, MATCHED_BY,false,true);
      foreward.addTarget(targetHandle);
//      foreward.getTargets().add(targetHandle);
       
      IRelationship back = mapper.get(targetHandle, IRelationship.Kind.DECLARE, MATCHES_DECLARE,false,true);
      if (back != null && back.getTargets() != null) {
        back.addTarget(sourceHandle);
        //back.getTargets().add(sourceHandle);  
      }
    }
  }
View Full Code Here

Examples of org.aspectj.asm.IRelationship

        onType.getSourceLocation().getColumn(),
        onType.getSourceLocation().getOffset());
       
      IRelationshipMap mapper = AsmManager.getDefault().getRelationshipMap();
      if (sourceHandle != null && targetHandle != null) {
        IRelationship foreward = mapper.get(sourceHandle, IRelationship.Kind.DECLARE_INTER_TYPE, INTER_TYPE_DECLARES,false,true);
        foreward.addTarget(targetHandle);
//        foreward.getTargets().add(targetHandle);
       
        IRelationship back = mapper.get(targetHandle, IRelationship.Kind.DECLARE_INTER_TYPE, INTER_TYPE_DECLARED_BY,false,true);
        back.addTarget(sourceHandle);
//        back.getTargets().add(sourceHandle); 
      }
    }
  }
View Full Code Here

Examples of org.aspectj.asm.IRelationship

        targetType.getSourceLocation().getColumn(),
        targetType.getSourceLocation().getOffset());
       
    IRelationshipMap mapper = AsmManager.getDefault().getRelationshipMap();
    if (sourceHandle != null && targetHandle != null) {
      IRelationship foreward = mapper.get(sourceHandle, IRelationship.Kind.DECLARE_INTER_TYPE, INTER_TYPE_DECLARES,false,true);
      foreward.addTarget(targetHandle);
       
      IRelationship back = mapper.get(targetHandle, IRelationship.Kind.DECLARE_INTER_TYPE, INTER_TYPE_DECLARED_BY,false,true);
      back.addTarget(sourceHandle);
    }
   
  }
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.