From 7df49ff69b2938244240737c685223fbef1d387a Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 20 Jan 2006 11:23:09 +0000 Subject: [PATCH] 77166 - newarray joinpoint support. "-Xjoinpoints:arrayconstruction" --- .../aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 1 + loadtime/src/org/aspectj/weaver/loadtime/Options.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index 9c888fccf..91fc89146 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -214,6 +214,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { setMessageHandler(weaverOption.messageHandler); world.setXlazyTjp(weaverOption.lazyTjp); world.setXHasMemberSupportEnabled(weaverOption.hasMember); + world.setOptionalJoinpoints(weaverOption.optionalJoinpoints); world.setPinpointMode(weaverOption.pinpoint); weaver.setReweavableMode(weaverOption.notReWeavable); world.setXnoInline(weaverOption.noInline); diff --git a/loadtime/src/org/aspectj/weaver/loadtime/Options.java b/loadtime/src/org/aspectj/weaver/loadtime/Options.java index 2cad59e75..65d837d40 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/Options.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/Options.java @@ -43,6 +43,7 @@ public class Options { private final static String OPTIONVALUED_messageHandler = "-XmessageHandlerClass:"; private static final String OPTIONVALUED_Xlintfile = "-Xlintfile:"; private static final String OPTIONVALUED_Xlint = "-Xlint:"; + private static final String OPTIONVALUED_joinpoints = "-Xjoinpoints:"; public static WeaverOption parse(String options, ClassLoader laoder, IMessageHandler imh) { @@ -97,6 +98,9 @@ public class Options { weaverOption.showWeaveInfo = true; } else if (arg.equalsIgnoreCase(OPTION_hasMember)) { weaverOption.hasMember = true; + } else if (arg.startsWith(OPTIONVALUED_joinpoints)) { + if (arg.length()>OPTIONVALUED_joinpoints.length()) + weaverOption.optionalJoinpoints = arg.substring(OPTIONVALUED_joinpoints.length()).trim(); } else if (arg.equalsIgnoreCase(OPTION_verbose)) { weaverOption.verbose = true; } else if (arg.equalsIgnoreCase(OPTION_pinpoint)) { @@ -141,6 +145,7 @@ public class Options { boolean java5; boolean lazyTjp; boolean hasMember; + String optionalJoinpoints; boolean noWarn; boolean proceedOnError; boolean verbose; -- 2.39.5