package com.poco.PoCoRuntime;

import org.aspectj.lang.JoinPoint;

/**
 * Represents an action/result intercepted by AspectJ for use by PoCo policies.
 * This object is created from an AspectJ JoinPoint object and provides all necessary
 * information for PoCo policies to make a decision.
 */
public class Event {
    private String signature;
    public String eventType;

    /**
     * Construct an event from explicitly passed details. Used when testing.
     *
     * @param signature method signature of event
     */
    public Event(String eventType, String signature) {
        this.eventType = eventType;
        this.signature = signature;
    }

    public Event(String eventType) {
        this.eventType = eventType;
        this.signature = "";
    }

    public Event(JoinPoint joinPoint) {
        this.signature = joinPoint.getSignature().toString();
    }

    public String getSignature() {
        return signature;
    }
}

@@ -23,17 +23,16 @@
 untime;%0A
-%0A
 import o
@@ -367,16 +367,193 @@
 tType;%0A%0A
+    private Object result = null;%0A%0A    public Object getResult() %7B%0A        return result;%0A    %7D%0A%0A    public void setResult(Object result) %7B%0A        this.result = result;%0A    %7D%0A%0A
     /**%0A
@@ -1077,24 +1077,24 @@
 gnature() %7B%0A
-
         retu
@@ -1112,11 +1112,185 @@
 e;%0A    %7D
+%0A%0A    @Override%0A    public String toString() %7B%0A        return %22Event %5Bsignature=%22 + signature + %22, eventType=%22 + eventType%0A                + %22, result=%22 + result + %22%5D%22;%0A    %7D
 %0A%7D%0A

add toString() and get/set