@@ -549,6 +549,8 @@ public class BuildArgParser extends Main { | |||
if (arg.endsWith(":compress")) { | |||
showWarning("-Xreweavable:compress is no longer available - reweavable is now default"); | |||
} | |||
} else if (arg.startsWith("-Xset:")) { | |||
buildConfig.setXconfigurationInfo(arg.substring(6)); | |||
} else if (arg.startsWith("-XnotReweavable")) { | |||
buildConfig.setXnotReweavable(true); | |||
} else if (arg.equals("-XnoInline")) { |
@@ -386,6 +386,7 @@ public class AjBuildConfig { | |||
if (!isXNotReweavable() && global.isXNotReweavable()) { | |||
setXnotReweavable(true); | |||
} | |||
setXconfigurationInfo(global.getXconfigurationInfo()); | |||
} | |||
void join(Collection local, Collection global) { | |||
@@ -499,6 +500,13 @@ public class AjBuildConfig { | |||
options.xNotReweavable = b; | |||
} | |||
public void setXconfigurationInfo(String info) { | |||
options.xConfigurationInfo = info; | |||
} | |||
public String getXconfigurationInfo() { | |||
return options.xConfigurationInfo; | |||
} | |||
public void setXHasMemberSupport(boolean enabled) { | |||
options.xHasMember = enabled; | |||
} |
@@ -625,6 +625,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc | |||
cp.addAll(buildConfig.getClasspath()); | |||
BcelWorld bcelWorld = new BcelWorld(cp, handler, null); | |||
bcelWorld.setBehaveInJava5Way(buildConfig.getBehaveInJava5Way()); | |||
bcelWorld.performExtraConfiguration(buildConfig.getXconfigurationInfo()); | |||
bcelWorld.setTargetAspectjRuntimeLevel(buildConfig.getTargetAspectjRuntimeLevel()); | |||
bcelWorld.setOptionalJoinpoints(buildConfig.getXJoinpoints()); | |||
bcelWorld.setXnoInline(buildConfig.isXnoInline()); |
@@ -79,6 +79,8 @@ public class AjCompilerOptions extends CompilerOptions { | |||
// Specifies the level of the aspectjrt.jar we are targetting | |||
public String targetAspectjRuntimeLevel = Constants.RUNTIME_LEVEL_DEFAULT; | |||
public String xConfigurationInfo; | |||
// these next four not exposed by IDEs | |||
public boolean generateModel = false; | |||
public boolean generateJavaDocsInModel = false; |
@@ -22,6 +22,7 @@ import java.util.HashMap; | |||
import java.util.Iterator; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.Properties; | |||
import java.util.WeakHashMap; | |||
import org.aspectj.asm.IHierarchy; | |||
@@ -89,6 +90,7 @@ public abstract class World implements Dump.INode { | |||
/** Flags for the new joinpoints that are 'optional' */ | |||
private boolean optionalJoinpoint_ArrayConstruction = false; // Command line flag: "arrayconstruction" | |||
private Properties extraConfiguration = null; | |||
/** | |||
* A list of RuntimeExceptions containing full stack information for every | |||
@@ -656,6 +658,35 @@ public abstract class World implements Dump.INode { | |||
behaveInJava5Way = b; | |||
} | |||
public void performExtraConfiguration(String config) { | |||
if (config==null) return; | |||
// Bunch of name value pairs to split | |||
extraConfiguration = new Properties(); | |||
int pos =-1; | |||
while ((pos=config.indexOf(","))!=-1) { | |||
String nvpair = config.substring(0,pos); | |||
int pos2 = nvpair.indexOf("="); | |||
if (pos2!=-1) { | |||
String n = nvpair.substring(0,pos2); | |||
String v = nvpair.substring(pos2+1); | |||
extraConfiguration.setProperty(n,v); | |||
} | |||
config = config.substring(pos+1); | |||
} | |||
if (config.length()>0) { | |||
int pos2 = config.indexOf("="); | |||
if (pos2!=-1) { | |||
String n = config.substring(0,pos2); | |||
String v = config.substring(pos2+1); | |||
extraConfiguration.setProperty(n,v); | |||
} | |||
} | |||
} | |||
public Properties getExtraConfiguration() { | |||
return extraConfiguration; | |||
} | |||
public boolean isInJava5Mode() { | |||
return behaveInJava5Way; | |||
} |