-<project default="extractAndJar" basedir=".">
+<project default="extractAndPatchAndJar" basedir=".">
<!-- top-level -->
- <target name="extractAndJar" depends="extract,jar,srcjar" />
+ <target name="extractAndPatchAndJar" depends="extractAndPatch,jar,srcjar" />
- <target name="extract" depends="unzipSource,createPatchedSource" />
+ <target name="extractAndPatch" depends="unzipSource,createPatchedSource" />
<target name="jar" depends="pack">
<copy file="../lib/regexp/jakarta-regexp-1.2.jar"
<copy file="bcel-src.zip" todir="../lib/bcel" />
</target>
- <target name="diff" depends="pack">
+ <target name="diff" depends="transformFromAJ,pack">
<!-- Wipe out some of the rubbish that can arise due to doing a 'ant jar' before doing the diff -->
<delete dir="bcel/bin"/>
<unzip src="bcel-5.1-src.zip" dest="." />
</target>
- <target name="createPatchedSource" depends="patch,unpack" />
+ <target name="createPatchedSource" depends="patch,unpack,transformToAJ" />
<target name="patch">
<delete dir="bcel" />
<target name="unpack">
<delete dir="src" />
<copy toDir="src">
- <fileset dir="bcel/src/java" />
+ <fileset dir="bcel/src/java" >
+ </fileset>
</copy>
</target>
+
+ <target name="transformFromAJ">
+ <delete dir="src-temp" />
+
+ <echo message="Copying 'src' to 'src-temp' and modifying file names to remove aspectj"/>
+
+ <copy toDir="src-temp">
+ <fileset dir="src"/>
+ <mapper type="regexp" from="^(.*)aspectj\\apache(.*)$" to="\1apache\2"/>
+ </copy>
+
+ <delete dir="src"/>
+
+ <echo message="Modifying file contents to change refs from 'org.aspectj.apache.bcel' to 'org.apache.bcel'"/>
+ <replaceregexp byline="true" flags="g">
+ <regexp pattern="org.aspectj.apache.bcel"/>
+ <substitution expression="org.apache.bcel"/>
+ <fileset dir="src-temp">
+ <include name="**/*"/>
+ </fileset>
+ </replaceregexp>
+
+ <echo message="Copying from 'src-temp' back to 'src'"/>
+ <copy toDir="src">
+ <fileset dir="src-temp"/>
+ </copy>
+ <delete dir="src-temp"/>
+ </target>
+
+ <target name="transformToAJ">
+ <delete dir="src-temp" />
+
+ <echo message="Copying 'src' to 'src-temp' and modifying file names to include aspectj"/>
+
+ <copy toDir="src-temp">
+ <fileset dir="src"/>
+ <mapper type="regexp" from="^(.*)apache(.*)$" to="\1aspectj\\apache\2"/>
+ </copy>
+
+ <delete dir="src"/>
+
+ <echo message="Modifying file contents to change refs from 'org.apache.bcel' to 'org.aspectj.apache.bcel'"/>
+ <replaceregexp byline="true" flags="g">
+ <regexp pattern="org.apache.bcel"/>
+ <substitution expression="org.aspectj.apache.bcel"/>
+ <fileset dir="src-temp">
+ <include name="**/*"/>
+ </fileset>
+ </replaceregexp>
+
+ <echo message="Copying from 'src-temp' back to 'src'"/>
+ <copy toDir="src">
+ <fileset dir="src-temp"/>
+ </copy>
+ <delete dir="src-temp"/>
+ </target>
</project>
diff -N -a -u -r -b bcel-5.1/build.xml bcel/build.xml
--- bcel-5.1/build.xml 2003-04-25 09:06:14.000000000 +0100
-+++ bcel/build.xml 2004-05-24 14:05:28.265625000 +0100
++++ bcel/build.xml 2004-08-11 21:25:17.449281600 +0100
@@ -65,7 +65,7 @@
<target name="build" depends="compile"/>
manifest="${basedir}/manifest.txt"
diff -N -a -u -r -b bcel-5.1/manifest.txt bcel/manifest.txt
--- bcel-5.1/manifest.txt 1970-01-01 00:00:00.000000000 +0000
-+++ bcel/manifest.txt 2004-05-24 14:05:28.328125000 +0100
++++ bcel/manifest.txt 2004-08-11 21:25:17.509368000 +0100
@@ -0,0 +1,3 @@
+Created-By: Jakarta BCEL 5.1
+Manifest-Version: 1.0
+Main-Class: listclass
diff -N -a -u -r -b bcel-5.1/src/java/org/apache/bcel/generic/Instruction.java bcel/src/java/org/apache/bcel/generic/Instruction.java
--- bcel-5.1/src/java/org/apache/bcel/generic/Instruction.java 2003-04-25 09:06:16.000000000 +0100
-+++ bcel/src/java/org/apache/bcel/generic/Instruction.java 2004-05-24 14:38:31.062500000 +0100
++++ bcel/src/java/org/apache/bcel/generic/Instruction.java 2004-08-11 21:28:49.424086400 +0100
@@ -190,26 +190,223 @@
Class clazz;
diff -N -a -u -r -b bcel-5.1/src/java/org/apache/bcel/generic/LDC_W.java bcel/src/java/org/apache/bcel/generic/LDC_W.java
--- bcel-5.1/src/java/org/apache/bcel/generic/LDC_W.java 2003-04-25 09:06:16.000000000 +0100
-+++ bcel/src/java/org/apache/bcel/generic/LDC_W.java 2004-05-24 14:38:31.359375000 +0100
++++ bcel/src/java/org/apache/bcel/generic/LDC_W.java 2004-08-11 21:28:47.160832000 +0100
@@ -83,6 +83,6 @@
{
setIndex(bytes.readUnsignedShort());
}
diff -N -a -u -r -b bcel-5.1/src/java/org/apache/bcel/generic/MethodGen.java bcel/src/java/org/apache/bcel/generic/MethodGen.java
--- bcel-5.1/src/java/org/apache/bcel/generic/MethodGen.java 2003-04-25 09:06:16.000000000 +0100
-+++ bcel/src/java/org/apache/bcel/generic/MethodGen.java 2004-05-24 14:38:30.343750000 +0100
++++ bcel/src/java/org/apache/bcel/generic/MethodGen.java 2004-08-11 21:28:47.641523200 +0100
@@ -133,9 +133,9 @@
/* Add local variables, namely the implicit `this' and the arguments
project, well, then you've got some development to do. You'll need
to know some more ant targets. But before anything, get that
<strong>bcel-5.1-src.zip</strong> and stick it in this directory.
+<b>NOTE: You should be working on BCEL when the package names are org.aspectj.apache.bcel,
+and *not* when the package names are org.apache.bcel. If you run the extractAndPatch task
+below, you will be left with a src folder in the correct state for further development.</b>
</p>
<p> There are five top-level ant targets apart from the usual "clean":</p>
<ul>
- <li>ant extractAndJar -- this is just the composition of the extract,
+ <li>ant extractAndPatchAndJar -- this is just the composition of the extract,
jar and srcjar targets, and is the default. It extracts the source from bcel-5.1-src.zip,
- patches it, compiles the patched version into a jar and drops the new archives:
+ patches it, renames the files to start org.aspectj.apache rather than org.apache then
+ compiles the patched version into a jar and drops the new archives:
bcel.jar and bcel-src.zip, into the project root. This is the default task, mainly used
to sanity check the building and make sure we're generating something.
The bcel.jar and bcel-src.zip generated should be the same as that in ..\lib\bcel\.
</li>
- <li>ant extract -- this extracts the source from bcel-5.1-src.zip,
- patches it, and copies the patched source into the project src directory,
+ <li>ant extractAndPatch -- this extracts the source from bcel-5.1-src.zip,
+ patches it, renames the files to start org.aspectj.apache rather than org.apache then
+ copies the patched source into the project src directory,
there to be visible by eclipse for people to do development on it.
For the patch file to be applied you need to have a patch.exe on your path,
this bcel building process was tested with the version from cygwin.
<li>ant diff -- this creates the patch.txt file, composed of the differences
between the project src directory and the original bcel-5.1 source.
+ In order to create the patch, we transform the packages back to org.apache from
+ org.aspectj.apache. To continue working on BCEL once you have done this, you might
+ need to run the transformToAJ task to switch the packages back to the AJ prefix.
For the patch file to be built successfully you need to have a diff.exe on your path,
this bcel building process was tested with the version from cygwin.
</li>
+
+ <li>ant transformToAJ - this changes the packages for the BCEL classes to
+ org.aspectj.apache from org.apache. This is used by the extractAndPatch task above.
+ </li>
+
+ <li>ant transformFromAJ - this changes the packages for the BCEL classes to
+ org.apache from org.aspectj.apache. This is used by the diff task.
+ </li>
</ul>
<p> All of the tasks are destructive, so don't do "ant extract", for example,
import java.util.Collection;
import java.util.Collections;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionList;
import org.aspectj.weaver.Advice;
import org.aspectj.weaver.AdviceKind;
import org.aspectj.weaver.AjAttribute;
import java.util.ArrayList;
import java.util.List;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.Unknown;
-import org.apache.bcel.generic.ConstantPoolGen;
+import org.aspectj.apache.bcel.classfile.Attribute;
+import org.aspectj.apache.bcel.classfile.Unknown;
+import org.aspectj.apache.bcel.generic.ConstantPoolGen;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.ISourceContext;
package org.aspectj.weaver.bcel;
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.Type;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.generic.Instruction;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.weaver.Member;
import org.aspectj.weaver.NameMangler;
import org.aspectj.weaver.ResolvedTypeX;
package org.aspectj.weaver.bcel;
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.generic.FieldGen;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.Type;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.classfile.Field;
+import org.aspectj.apache.bcel.generic.FieldGen;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.ObjectType;
+import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.weaver.Member;
import org.aspectj.weaver.NameMangler;
import org.aspectj.weaver.ResolvedMember;
import java.util.Map;
import java.util.Set;
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.BranchInstruction;
-import org.apache.bcel.generic.CPInstruction;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.FieldInstruction;
-import org.apache.bcel.generic.INVOKESPECIAL;
-import org.apache.bcel.generic.IndexedInstruction;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.InstructionTargeter;
-import org.apache.bcel.generic.InvokeInstruction;
-import org.apache.bcel.generic.LocalVariableInstruction;
-import org.apache.bcel.generic.NEW;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.PUTFIELD;
-import org.apache.bcel.generic.PUTSTATIC;
-import org.apache.bcel.generic.RET;
-import org.apache.bcel.generic.ReturnInstruction;
-import org.apache.bcel.generic.Select;
-import org.apache.bcel.generic.Type;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.generic.BranchInstruction;
+import org.aspectj.apache.bcel.generic.CPInstruction;
+import org.aspectj.apache.bcel.generic.ConstantPoolGen;
+import org.aspectj.apache.bcel.generic.FieldInstruction;
+import org.aspectj.apache.bcel.generic.INVOKESPECIAL;
+import org.aspectj.apache.bcel.generic.IndexedInstruction;
+import org.aspectj.apache.bcel.generic.Instruction;
+import org.aspectj.apache.bcel.generic.InstructionConstants;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.InstructionTargeter;
+import org.aspectj.apache.bcel.generic.InvokeInstruction;
+import org.aspectj.apache.bcel.generic.LocalVariableInstruction;
+import org.aspectj.apache.bcel.generic.NEW;
+import org.aspectj.apache.bcel.generic.ObjectType;
+import org.aspectj.apache.bcel.generic.PUTFIELD;
+import org.aspectj.apache.bcel.generic.PUTSTATIC;
+import org.aspectj.apache.bcel.generic.RET;
+import org.aspectj.apache.bcel.generic.ReturnInstruction;
+import org.aspectj.apache.bcel.generic.Select;
+import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.bridge.IMessage;
import org.aspectj.util.FuzzyBoolean;
import org.aspectj.util.PartialOrder;
import java.util.Iterator;
import java.util.List;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.Synthetic;
+import org.aspectj.apache.bcel.classfile.Attribute;
+import org.aspectj.apache.bcel.classfile.Field;
+import org.aspectj.apache.bcel.classfile.Synthetic;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.ResolvedMember;
package org.aspectj.weaver.bcel;
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.generic.Instruction;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionList;
import org.aspectj.weaver.ResolvedTypeX;
/**
import java.util.Iterator;
import java.util.List;
-import org.apache.bcel.classfile.ExceptionTable;
-import org.apache.bcel.classfile.LocalVariable;
-import org.apache.bcel.classfile.LocalVariableTable;
-import org.apache.bcel.classfile.Method;
+import org.aspectj.apache.bcel.classfile.ExceptionTable;
+import org.aspectj.apache.bcel.classfile.LocalVariable;
+import org.aspectj.apache.bcel.classfile.LocalVariableTable;
+import org.aspectj.apache.bcel.classfile.Method;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.ResolvedMember;
import java.util.Iterator;
import java.util.List;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
+import org.aspectj.apache.bcel.classfile.Field;
+import org.aspectj.apache.bcel.classfile.JavaClass;
+import org.aspectj.apache.bcel.classfile.Method;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.BCException;
package org.aspectj.weaver.bcel;
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.ReferenceType;
-import org.apache.bcel.generic.Type;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.ReferenceType;
+import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.Member;
import org.aspectj.weaver.ast.And;
import java.util.Iterator;
import java.util.List;
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.generic.ACONST_NULL;
-import org.apache.bcel.generic.ArrayType;
-import org.apache.bcel.generic.BranchInstruction;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.DUP;
-import org.apache.bcel.generic.DUP_X1;
-import org.apache.bcel.generic.FieldInstruction;
-import org.apache.bcel.generic.INVOKESPECIAL;
-import org.apache.bcel.generic.INVOKESTATIC;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.InstructionTargeter;
-import org.apache.bcel.generic.InvokeInstruction;
-import org.apache.bcel.generic.NEW;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.ReturnInstruction;
-import org.apache.bcel.generic.SWAP;
-import org.apache.bcel.generic.StoreInstruction;
-import org.apache.bcel.generic.TargetLostException;
-import org.apache.bcel.generic.Type;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.classfile.Field;
+import org.aspectj.apache.bcel.generic.ACONST_NULL;
+import org.aspectj.apache.bcel.generic.ArrayType;
+import org.aspectj.apache.bcel.generic.BranchInstruction;
+import org.aspectj.apache.bcel.generic.ConstantPoolGen;
+import org.aspectj.apache.bcel.generic.DUP;
+import org.aspectj.apache.bcel.generic.DUP_X1;
+import org.aspectj.apache.bcel.generic.FieldInstruction;
+import org.aspectj.apache.bcel.generic.INVOKESPECIAL;
+import org.aspectj.apache.bcel.generic.INVOKESTATIC;
+import org.aspectj.apache.bcel.generic.Instruction;
+import org.aspectj.apache.bcel.generic.InstructionConstants;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.InstructionTargeter;
+import org.aspectj.apache.bcel.generic.InvokeInstruction;
+import org.aspectj.apache.bcel.generic.NEW;
+import org.aspectj.apache.bcel.generic.ObjectType;
+import org.aspectj.apache.bcel.generic.ReturnInstruction;
+import org.aspectj.apache.bcel.generic.SWAP;
+import org.aspectj.apache.bcel.generic.StoreInstruction;
+import org.aspectj.apache.bcel.generic.TargetLostException;
+import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.weaver.Advice;
import org.aspectj.weaver.AdviceKind;
import java.util.Iterator;
import java.util.Set;
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.FieldGen;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.Type;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.generic.FieldGen;
+import org.aspectj.apache.bcel.generic.InstructionConstants;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.WeaveMessage;
import org.aspectj.weaver.AjcMemberMaker;
package org.aspectj.weaver.bcel;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.Instruction;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionList;
import org.aspectj.weaver.ResolvedTypeX;
import org.aspectj.weaver.ast.Var;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.JavaClass;
+import org.aspectj.apache.bcel.classfile.ClassParser;
+import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IProgressListener;
import org.aspectj.bridge.Message;
import java.util.List;
import java.util.StringTokenizer;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.FieldInstruction;
-import org.apache.bcel.generic.GETSTATIC;
-import org.apache.bcel.generic.INVOKEINTERFACE;
-import org.apache.bcel.generic.INVOKESPECIAL;
-import org.apache.bcel.generic.INVOKESTATIC;
-import org.apache.bcel.generic.InvokeInstruction;
-import org.apache.bcel.generic.PUTSTATIC;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.util.ClassPath;
+import org.aspectj.apache.bcel.classfile.ClassParser;
+import org.aspectj.apache.bcel.classfile.JavaClass;
+import org.aspectj.apache.bcel.classfile.Method;
+import org.aspectj.apache.bcel.generic.ConstantPoolGen;
+import org.aspectj.apache.bcel.generic.FieldInstruction;
+import org.aspectj.apache.bcel.generic.GETSTATIC;
+import org.aspectj.apache.bcel.generic.INVOKEINTERFACE;
+import org.aspectj.apache.bcel.generic.INVOKESPECIAL;
+import org.aspectj.apache.bcel.generic.INVOKESTATIC;
+import org.aspectj.apache.bcel.generic.InvokeInstruction;
+import org.aspectj.apache.bcel.generic.PUTSTATIC;
+import org.aspectj.apache.bcel.generic.Type;
+import org.aspectj.apache.bcel.util.ClassPath;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.weaver.Advice;
import org.aspectj.weaver.AdviceKind;
package org.aspectj.weaver.bcel;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionList;
import org.aspectj.weaver.TypeX;
/** exceptionRanges are set initially to be low priority. The various setPriority methods
import java.util.SortedMap;
import java.util.TreeMap;
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.Unknown;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.FieldGen;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.PUSH;
-import org.apache.bcel.generic.RETURN;
-import org.apache.bcel.generic.Type;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.classfile.Attribute;
+import org.aspectj.apache.bcel.classfile.ConstantUtf8;
+import org.aspectj.apache.bcel.classfile.Field;
+import org.aspectj.apache.bcel.classfile.JavaClass;
+import org.aspectj.apache.bcel.classfile.Method;
+import org.aspectj.apache.bcel.classfile.Unknown;
+import org.aspectj.apache.bcel.generic.ClassGen;
+import org.aspectj.apache.bcel.generic.ConstantPoolGen;
+import org.aspectj.apache.bcel.generic.FieldGen;
+import org.aspectj.apache.bcel.generic.InstructionConstants;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.ObjectType;
+import org.aspectj.apache.bcel.generic.PUSH;
+import org.aspectj.apache.bcel.generic.RETURN;
+import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.bridge.SourceLocation;
public String toShortString() {
String s =
- org.apache.bcel.classfile.Utility.accessToString(myGen.getAccessFlags(), true);
+ org.aspectj.apache.bcel.classfile.Utility.accessToString(myGen.getAccessFlags(), true);
if (s != "")
s += " ";
- s += org.apache.bcel.classfile.Utility.classOrInterface(myGen.getAccessFlags());
+ s += org.aspectj.apache.bcel.classfile.Utility.classOrInterface(myGen.getAccessFlags());
s += " ";
s += myGen.getClassName();
return s;
out.print(toShortString());
out.print(" extends ");
out.print(
- org.apache.bcel.classfile.Utility.compactClassName(
+ org.aspectj.apache.bcel.classfile.Utility.compactClassName(
myGen.getSuperclassName(),
false));
import java.util.Set;
import java.util.Stack;
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.Synthetic;
-import org.apache.bcel.generic.BranchHandle;
-import org.apache.bcel.generic.BranchInstruction;
-import org.apache.bcel.generic.CPInstruction;
-import org.apache.bcel.generic.ClassGenException;
-import org.apache.bcel.generic.CodeExceptionGen;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.InstructionTargeter;
-import org.apache.bcel.generic.LineNumberGen;
-import org.apache.bcel.generic.LocalVariableGen;
-import org.apache.bcel.generic.LocalVariableInstruction;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.Select;
-import org.apache.bcel.generic.Type;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.classfile.Attribute;
+import org.aspectj.apache.bcel.classfile.ConstantPool;
+import org.aspectj.apache.bcel.classfile.Method;
+import org.aspectj.apache.bcel.classfile.Synthetic;
+import org.aspectj.apache.bcel.generic.BranchHandle;
+import org.aspectj.apache.bcel.generic.BranchInstruction;
+import org.aspectj.apache.bcel.generic.CPInstruction;
+import org.aspectj.apache.bcel.generic.ClassGenException;
+import org.aspectj.apache.bcel.generic.CodeExceptionGen;
+import org.aspectj.apache.bcel.generic.ConstantPoolGen;
+import org.aspectj.apache.bcel.generic.Instruction;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.InstructionTargeter;
+import org.aspectj.apache.bcel.generic.LineNumberGen;
+import org.aspectj.apache.bcel.generic.LocalVariableGen;
+import org.aspectj.apache.bcel.generic.LocalVariableInstruction;
+import org.aspectj.apache.bcel.generic.MethodGen;
+import org.aspectj.apache.bcel.generic.ObjectType;
+import org.aspectj.apache.bcel.generic.Select;
+import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.bridge.IMessage;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.BCException;
}
public String toShortString() {
- String access = org.apache.bcel.classfile.Utility.accessToString(getAccessFlags());
+ String access = org.aspectj.apache.bcel.classfile.Utility.accessToString(getAccessFlags());
StringBuffer buf = new StringBuffer();
buf.append(" ");
}
buf.append(
- org.apache.bcel.classfile.Utility.signatureToString(
+ org.aspectj.apache.bcel.classfile.Utility.signatureToString(
getReturnType().getSignature(),
true));
buf.append(" ");
int len = argumentTypes.length;
if (len > 0) {
buf.append(
- org.apache.bcel.classfile.Utility.signatureToString(
+ org.aspectj.apache.bcel.classfile.Utility.signatureToString(
argumentTypes[0].getSignature(),
true));
for (int i = 1; i < argumentTypes.length; i++) {
buf.append(", ");
buf.append(
- org.apache.bcel.classfile.Utility.signatureToString(
+ org.aspectj.apache.bcel.classfile.Utility.signatureToString(
argumentTypes[i].getSignature(),
true));
}
import java.util.Map;
-import org.apache.bcel.generic.IMPDEP1;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.InstructionTargeter;
+import org.aspectj.apache.bcel.generic.IMPDEP1;
+import org.aspectj.apache.bcel.generic.Instruction;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.InstructionTargeter;
import org.aspectj.weaver.BCException;
abstract class Range implements InstructionTargeter {
package org.aspectj.weaver.bcel;
-import org.apache.bcel.generic.BranchInstruction;
-import org.apache.bcel.generic.IndexedInstruction;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.InstructionTargeter;
-import org.apache.bcel.generic.LocalVariableInstruction;
-import org.apache.bcel.generic.RET;
-import org.apache.bcel.generic.Select;
-import org.apache.bcel.generic.TargetLostException;
+import org.aspectj.apache.bcel.generic.BranchInstruction;
+import org.aspectj.apache.bcel.generic.IndexedInstruction;
+import org.aspectj.apache.bcel.generic.Instruction;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.InstructionTargeter;
+import org.aspectj.apache.bcel.generic.LocalVariableInstruction;
+import org.aspectj.apache.bcel.generic.RET;
+import org.aspectj.apache.bcel.generic.Select;
+import org.aspectj.apache.bcel.generic.TargetLostException;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.IntMap;
import org.aspectj.weaver.Shadow;
package org.aspectj.weaver.bcel;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionTargeter;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionTargeter;
/** A tag is an instruction-targeter that doesn't bother remembering its target(s) */
abstract class Tag implements InstructionTargeter, Cloneable {
import java.util.Iterator;
import java.util.List;
-import org.apache.bcel.classfile.JavaClass;
+import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.util.FileUtil;
public class UnwovenClassFile {
import java.io.IOException;
import java.lang.reflect.Modifier;
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.generic.ArrayType;
-import org.apache.bcel.generic.BIPUSH;
-import org.apache.bcel.generic.BasicType;
-import org.apache.bcel.generic.BranchInstruction;
-import org.apache.bcel.generic.ConstantPushInstruction;
-import org.apache.bcel.generic.INSTANCEOF;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.InstructionTargeter;
-import org.apache.bcel.generic.LDC;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.ReferenceType;
-import org.apache.bcel.generic.SIPUSH;
-import org.apache.bcel.generic.SWITCH;
-import org.apache.bcel.generic.Select;
-import org.apache.bcel.generic.TargetLostException;
-import org.apache.bcel.generic.Type;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.classfile.ClassParser;
+import org.aspectj.apache.bcel.classfile.JavaClass;
+import org.aspectj.apache.bcel.classfile.Method;
+import org.aspectj.apache.bcel.generic.ArrayType;
+import org.aspectj.apache.bcel.generic.BIPUSH;
+import org.aspectj.apache.bcel.generic.BasicType;
+import org.aspectj.apache.bcel.generic.BranchInstruction;
+import org.aspectj.apache.bcel.generic.ConstantPushInstruction;
+import org.aspectj.apache.bcel.generic.INSTANCEOF;
+import org.aspectj.apache.bcel.generic.Instruction;
+import org.aspectj.apache.bcel.generic.InstructionConstants;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.InstructionTargeter;
+import org.aspectj.apache.bcel.generic.LDC;
+import org.aspectj.apache.bcel.generic.ObjectType;
+import org.aspectj.apache.bcel.generic.ReferenceType;
+import org.aspectj.apache.bcel.generic.SIPUSH;
+import org.aspectj.apache.bcel.generic.SWITCH;
+import org.aspectj.apache.bcel.generic.Select;
+import org.aspectj.apache.bcel.generic.TargetLostException;
+import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.Member;
import org.aspectj.weaver.ResolvedTypeX;
import java.util.ArrayList;
import java.util.List;
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.Type;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionHandle;
+import org.aspectj.apache.bcel.generic.InstructionList;
+import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.weaver.AdviceKind;
import org.aspectj.weaver.Member;
import org.aspectj.weaver.ResolvedTypeX;
import java.io.*;
-import org.apache.bcel.generic.InstructionFactory;
+import org.aspectj.apache.bcel.generic.InstructionFactory;
import org.aspectj.weaver.*;
public class MoveInstructionsWeaveTestCase extends WeaveTestCase {
import junit.framework.*;
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.*;
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.generic.*;
import org.aspectj.weaver.*;
import org.aspectj.weaver.patterns.*;
import org.aspectj.testing.util.TestUtil;