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")) {
if (!isXNotReweavable() && global.isXNotReweavable()) {
setXnotReweavable(true);
}
+ setXconfigurationInfo(global.getXconfigurationInfo());
}
void join(Collection local, Collection global) {
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;
}
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());
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;
/** 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
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;
}