diff options
Diffstat (limited to 'org.aspectj.ajdt.core')
6 files changed, 27 insertions, 2 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java index 2de67f693..fd542eae3 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java @@ -529,7 +529,9 @@ public class BuildArgParser extends Main { } } else if (arg.equals("-XnoInline")) { buildConfig.setXnoInline(true); - } else if (arg.startsWith("-showWeaveInfo")) { + } else if (arg.equals("-XhasMember")) { + buildConfig.setXHasMemberSupport(true); + } else if (arg.startsWith("-showWeaveInfo")) { buildConfig.setShowWeavingInformation(true); } else if (arg.equals("-Xlintfile")) { if (args.size() > nextArgIndex) { diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties index a696691cf..ce6874f42 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties @@ -127,7 +127,9 @@ xoption.usage = {0} non-standard options:\n\ \t-Xreweavable:compress as above, but also compress the reweaving information\n\ \t-XserializableAspects allows aspects to implement serializable\n\ \t-XnoWeave compile classes but do not weave. Deprecated, use\n\ -\t reweavable instead.\n +\t reweavable instead.\n\ +\t-XhasMember allow hasmethod() and hasfield type patterns in\n\ +\t declare parents and declare @type\n ## options not documented above (per ..ajdt.ajc.BuildArgParser.java): # -XincrementalFile, -XjavadocsInModel diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java index f9fa4787f..26cc3fe25 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java @@ -477,6 +477,14 @@ public class AjBuildConfig { options.xReweavable = b; } + public void setXHasMemberSupport(boolean enabled) { + options.xHasMember = enabled; + } + + public boolean isXHasMemberEnabled() { + return options.xHasMember; + } + public boolean isXreweavable() { return options.xReweavable; } diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java index 1289922d5..d88b97f17 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java @@ -536,6 +536,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc bcelWorld.setBehaveInJava5Way(buildConfig.getBehaveInJava5Way()); bcelWorld.setXnoInline(buildConfig.isXnoInline()); bcelWorld.setXlazyTjp(buildConfig.isXlazyTjp()); + bcelWorld.setXHasMemberSupportEnabled(buildConfig.isXHasMemberEnabled()); BcelWeaver bcelWeaver = new BcelWeaver(bcelWorld); state.setWorld(bcelWorld); state.setWeaver(bcelWeaver); diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjCompilerOptions.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjCompilerOptions.java index 3fc7138d5..8c13e00b1 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjCompilerOptions.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjCompilerOptions.java @@ -42,6 +42,7 @@ public class AjCompilerOptions extends CompilerOptions { public static final String OPTION_XNoInline = "org.aspectj.ajdt.core.compiler.weaver.XNoInline"; public static final String OPTION_XReweavable = "org.aspectj.ajdt.core.compiler.weaver.XReweavable"; public static final String OPTION_XReweavableCompress = "org.aspectj.ajdt.core.compiler.weaver.XReweavableCompress"; + public static final String OPTION_XHasMember = "org.aspectj.ajdt.core.compiler.weaver.XHasMember"; // these next four not exposed by IDEs public static final String OPTION_XDevNoAtAspectJProcessing = "org.aspectj.ajdt.core.compiler.ast.NoAtAspectJProcessing"; @@ -66,6 +67,7 @@ public class AjCompilerOptions extends CompilerOptions { public boolean xNoInline = false; public boolean xReweavable = false; public boolean xReweavableCompress = false; + public boolean xHasMember = false; public boolean showWeavingInformation = false; // If true - autoboxing behaves differently ... @@ -119,6 +121,7 @@ public class AjCompilerOptions extends CompilerOptions { map.put(OPTION_XNoInline,this.xNoInline ? ENABLED : DISABLED); map.put(OPTION_XReweavable,this.xReweavable ? ENABLED : DISABLED); map.put(OPTION_XReweavableCompress,this.xReweavableCompress ? ENABLED : DISABLED); + map.put(OPTION_XHasMember, this.xHasMember ? ENABLED : DISABLED); map.put(OPTION_GenerateModel,this.generateModel ? ENABLED : DISABLED); map.put(OPTION_GenerateJavaDocsInModel,this.generateJavaDocsInModel ? ENABLED : DISABLED); @@ -186,6 +189,13 @@ public class AjCompilerOptions extends CompilerOptions { this.xReweavableCompress = false; } } + if ((optionValue = optionsMap.get(OPTION_XHasMember)) != null) { + if (ENABLED.equals(optionValue)) { + this.xHasMember = true; + } else if (DISABLED.equals(optionValue)) { + this.xHasMember = false; + } + } if ((optionValue = optionsMap.get(OPTION_GenerateModel)) != null) { if (ENABLED.equals(optionValue)) { @@ -244,6 +254,7 @@ public class AjCompilerOptions extends CompilerOptions { buf.append("\n\t- lazy thisJoinPoint (X option): ").append(this.xLazyThisJoinPoint ? ENABLED : DISABLED); //$NON-NLS-1$ buf.append("\n\t- generate reweavable class files (X option): ").append(this.xReweavable ? ENABLED : DISABLED); //$NON-NLS-1$ buf.append("\n\t- compress reweavable class files (X option): ").append(this.xReweavableCompress ? ENABLED : DISABLED); //$NON-NLS-1$ + buf.append("\n\t- has member support (X option): ").append(this.xHasMember ? ENABLED : DISABLED); //$NON-NLS-1$ buf.append("\n\t- generate AJDE model: ").append(this.generateModel ? ENABLED : DISABLED); //$NON-NLS-1$ buf.append("\n\t- generate Javadocs in AJDE model: ").append(this.generateJavaDocsInModel ? ENABLED : DISABLED); //$NON-NLS-1$ diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java index 5ee6e0138..8198012b0 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java @@ -158,6 +158,7 @@ public class AspectJBuilder extends JavaBuilder implements ICompilerAdapterFacto myBcelWorld.setBehaveInJava5Way(options.behaveInJava5Way); myBcelWorld.setXnoInline(options.xNoInline); myBcelWorld.setXlazyTjp(options.xLazyThisJoinPoint); + myBcelWorld.setXHasMemberSupportEnabled(options.xHasMember); setLintProperties(myBcelWorld,options); myWeaver = new BcelWeaver(myBcelWorld); myWeaver.setReweavableMode(options.xReweavable,options.xReweavableCompress); |