Package ssv.interaction.model

Examples of ssv.interaction.model.Instance


  private Instance target;
  private Instance result;
  private static Map<String, Instance> idInstanceMap = new HashMap<String, Instance>();

  private Instance setupInstance(SymbolicInstance<?> spoonSymbolicInstance) {
    Instance instance = null;
    if (spoonSymbolicInstance != null) {
      String callerId = spoonSymbolicInstance.getId();
      instance = idInstanceMap.get(callerId);
      if (instance == null) {
        instance = new SpoonInstanceAdapter(spoonSymbolicInstance);
        idInstanceMap.put(callerId, instance);
      }
    } else {
      instance = idInstanceMap.get(UnknownInstance.UNKNOWN_INSTANCE_ID_STRING);
      if (instance == null) {
        instance = new UnknownInstance(null);
        idInstanceMap.put(instance.getId(), instance);
      }
    }
    return instance;
  }
View Full Code Here


  private Instance result;
  private boolean isExit;
  private static Map<Instance, String> idInstanceMap = new HashMap<Instance, String>();

  private Instance setupInstance(Object realInstance) {
    Instance instance = null;
    if (realInstance != null) {
      instance = new JoinPointInstanceAdapter(realInstance);
      String callerId = idInstanceMap.get(instance);
      if (callerId == null) {
        idInstanceMap.put(instance, instance.getId());
      }
    } else {
      instance = new UnknownInstance(null);
      idInstanceMap.put(instance, instance.getId());
    }
    return instance;
  }
View Full Code Here

  JoinPointInteractionAdapter(JoinPoint joinPoint, boolean isExit,
      Object result, boolean isConstructor) throws ModelException {
    this.isExit = isExit;
    this.joinPoint = joinPoint;
    Instance topOfClassStackBeforeCall = (classInstances.isEmpty()) ? null : classInstances.peek();
    // TODO: one problem when the first interaction has static target and caller
    if (joinPoint.getTarget() == null) {
      // calling a static method
      target = setupInstance(joinPoint.getStaticPart().getSignature()
          .getDeclaringType());
View Full Code Here

  private InstanceFilter instanceFilter = new DefaultInstanceFilter();
  private InteractionFilter interactionFilter = new DefaultInteractionFilter();

  public void processModelInteraction(Interaction modelInteraction) {
    T diagramInteraction;
    Instance callerInstance = modelInteraction.getCaller();
    Instance targetInstance = modelInteraction.getTarget();

    if (!(instanceFilter.filterInstance(callerInstance) || instanceFilter
        .filterInstance(targetInstance))
        && ((interactionFilter != null) ? !interactionFilter
            .filterInteraction(modelInteraction) : true)) {
View Full Code Here

    }
  }

  public String toString() {

    Instance caller = modelInteraction.getCaller();
    Instance target = modelInteraction.getTarget();
    String interactionString = null;
    if (target.equals(caller)) {
      // do nothing
    } else {
      int callerColumn = csvInteractionDiagramModel.getInstanceColumn(caller);
      int targetColumn = csvInteractionDiagramModel.getInstanceColumn(target);
      String callerName = getInteractionDisplayName(caller);
View Full Code Here

            SVGConstants.DEFUALT_EXIT_ARROW_STROKE_OPACITY);
        SVGAttributeKeys.FILL_OPACITY.set(interactionLabel,
            SVGConstants.DEFAULT_EXIT_STROKE_OPACITY);
        interactionArrow.basicAdd(SVGArrow.createArrowForLinePath(
            linePath, direction, true && !selfCall));
        Instance result = modelInteraction.getResult();
        // TODO: check if null check is necessary
        if (result != null) {
          // TODO: this string format should be abstracted since the
          // parameters use the same format and might want to make
          // display configurable
          interactionText = result.getSimpleName() + ":"
              + result.getSimpleTypeName();
        } else {
          // TODO: initial implementation: verify this is ok
          interactionText = "null";
        }
      } else {
View Full Code Here

TOP

Related Classes of ssv.interaction.model.Instance

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.