summaryrefslogtreecommitdiffstats
path: root/loadtime
diff options
context:
space:
mode:
authormwebster <mwebster>2006-08-23 11:52:22 +0000
committermwebster <mwebster>2006-08-23 11:52:22 +0000
commit8549d861b124c20eba114b658e886bfbaf5d231c (patch)
tree23e297d985530526f65041b21bf113171665139a /loadtime
parent30c0ada8a7430c4cfeab89f94291f328099e9da4 (diff)
downloadaspectj-8549d861b124c20eba114b658e886bfbaf5d231c.tar.gz
aspectj-8549d861b124c20eba114b658e886bfbaf5d231c.zip
Bug 150271 "Allow multiple levels of LTW information" (make weaving/not weaving messages debug and add -debug to options for aop.xml)
Diffstat (limited to 'loadtime')
-rw-r--r--loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java2
-rw-r--r--loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java4
-rw-r--r--loadtime/src/org/aspectj/weaver/loadtime/Options.java7
3 files changed, 12 insertions, 1 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
index d43034c90..20d57f3e7 100644
--- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
+++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
@@ -673,7 +673,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor {
private void defineClass(ClassLoader loader, String name, byte[] bytes) {
if (trace.isTraceEnabled()) trace.enter("defineClass",this,new Object[] {loader,name,bytes});
Object clazz = null;
- info("generating class '" + name + "'");
+ debug("generating class '" + name + "'");
try {
//TODO av protection domain, and optimize
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java b/loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
index 80d6e23e3..c9b4a6d9f 100644
--- a/loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
+++ b/loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
@@ -21,6 +21,7 @@ import org.aspectj.bridge.AbortException;
public class DefaultMessageHandler implements IMessageHandler {
boolean isVerbose = false;
+ boolean isDebug = false;
boolean showWeaveInfo = false;
boolean showWarn = true;
@@ -43,6 +44,9 @@ public class DefaultMessageHandler implements IMessageHandler {
if (kind.isSameOrLessThan(IMessage.INFO)) {
return !isVerbose;
}
+ if (kind.isSameOrLessThan(IMessage.DEBUG)) {
+ return !isDebug;
+ }
return !showWarn;
}
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/Options.java b/loadtime/src/org/aspectj/weaver/loadtime/Options.java
index 67265343f..be01cb7ec 100644
--- a/loadtime/src/org/aspectj/weaver/loadtime/Options.java
+++ b/loadtime/src/org/aspectj/weaver/loadtime/Options.java
@@ -35,6 +35,7 @@ public class Options {
private final static String OPTION_noWarnNone = "-warn:none";
private final static String OPTION_proceedOnError = "-proceedOnError";
private final static String OPTION_verbose = "-verbose";
+ private final static String OPTION_debug = "-debug";
private final static String OPTION_reweavable = "-Xreweavable";//notReweavable is default for LTW
private final static String OPTION_noinline = "-Xnoinline";
private final static String OPTION_addSerialVersionUID = "-XaddSerialVersionUID";
@@ -106,6 +107,8 @@ public class Options {
weaverOption.optionalJoinpoints = arg.substring(OPTIONVALUED_joinpoints.length()).trim();
} else if (arg.equalsIgnoreCase(OPTION_verbose)) {
weaverOption.verbose = true;
+ } else if (arg.equalsIgnoreCase(OPTION_debug)) {
+ weaverOption.debug = true;
} else if (arg.equalsIgnoreCase(OPTION_pinpoint)) {
weaverOption.pinpoint = true;
} else if (arg.startsWith(OPTIONVALUED_messageHandler)) {
@@ -141,6 +144,9 @@ public class Options {
if (weaverOption.verbose) {
weaverOption.messageHandler.dontIgnore(IMessage.INFO);
}
+ if (weaverOption.debug) {
+ weaverOption.messageHandler.dontIgnore(IMessage.DEBUG);
+ }
if (weaverOption.showWeaveInfo) {
weaverOption.messageHandler.dontIgnore(IMessage.WEAVEINFO);
}
@@ -156,6 +162,7 @@ public class Options {
boolean noWarn;
boolean proceedOnError;
boolean verbose;
+ boolean debug;
boolean notReWeavable = true;//default to notReweavable for LTW (faster)
boolean noInline;
boolean addSerialVersionUID;