From bce3f0847b7398fb3fa3bc1c076f04624f74c7a1 Mon Sep 17 00:00:00 2001 From: mwebster Date: Mon, 6 Nov 2006 13:52:15 +0000 Subject: [PATCH] Bug 155033 "Use ajcore for LTW problems" (new convenience methods and formatting for Kind) --- weaver/src/org/aspectj/weaver/tools/AbstractTrace.java | 7 +++++++ weaver/src/org/aspectj/weaver/tools/Trace.java | 2 ++ 2 files changed, 9 insertions(+) diff --git a/weaver/src/org/aspectj/weaver/tools/AbstractTrace.java b/weaver/src/org/aspectj/weaver/tools/AbstractTrace.java index b426c0e9e..2ec0aa3a9 100644 --- a/weaver/src/org/aspectj/weaver/tools/AbstractTrace.java +++ b/weaver/src/org/aspectj/weaver/tools/AbstractTrace.java @@ -17,6 +17,8 @@ import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Date; +import org.aspectj.bridge.IMessage.Kind; + public abstract class AbstractTrace implements Trace { protected Class tracedClass; @@ -54,6 +56,10 @@ public abstract class AbstractTrace implements Trace { exit(methodName,new Boolean(b)); } + public void exit (String methodName, int i) { + exit(methodName,new Integer(i)); + } + public void event (String methodName, Object thiz, Object arg) { event(methodName,thiz,new Object[] { arg }); } @@ -125,6 +131,7 @@ public abstract class AbstractTrace implements Trace { || obj instanceof File || obj instanceof StringBuffer || obj instanceof URL + || obj instanceof Kind ) return obj; else if (obj.getClass().isArray()) { return formatArray(obj); diff --git a/weaver/src/org/aspectj/weaver/tools/Trace.java b/weaver/src/org/aspectj/weaver/tools/Trace.java index 6c4ac3873..c1a040d36 100644 --- a/weaver/src/org/aspectj/weaver/tools/Trace.java +++ b/weaver/src/org/aspectj/weaver/tools/Trace.java @@ -52,6 +52,8 @@ public interface Trace { public void exit (String methodName, boolean b); + public void exit (String methodName, int i); + public void event (String methodName, Object thiz, Object arg); public boolean isTraceEnabled (); -- 2.39.5