import java.io.PrintWriter;
import java.net.URL;
import java.net.URLClassLoader;
+import java.security.ProtectionDomain;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
private WeavingAdaptorMessageHolder messageHolder;
private boolean abortOnError = false;
protected GeneratedClassHandler generatedClassHandler;
- protected Map generatedClasses = new HashMap(); /* String -> UnwovenClassFile */
+ protected Map<String, IUnwovenClassFile> generatedClasses = new HashMap<String, IUnwovenClassFile>();
public BcelObjectType delegateForCurrentClass; // lazily initialized, should be used to prevent parsing bytecode multiple
// times
+ protected ProtectionDomain activeProtectionDomain;
private boolean haveWarnedOnJavax = false;
}
private List getFullClassPath(ClassLoader loader) {
- List list = new LinkedList();
+ List<String> list = new LinkedList<String>();
for (; loader != null; loader = loader.getParent()) {
if (loader instanceof URLClassLoader) {
URL[] urls = ((URLClassLoader) loader).getURLs();
}
private List getFullAspectPath(ClassLoader loader) {
- List list = new LinkedList();
+ List<String> list = new LinkedList<String>();
for (; loader != null; loader = loader.getParent()) {
if (loader instanceof WeavingClassLoader) {
URL[] urls = ((WeavingClassLoader) loader).getAspectURLs();
}
}
- private static List makeClasspath(String cp) {
- List ret = new ArrayList();
+ private static List<String> makeClasspath(String cp) {
+ List<String> ret = new ArrayList<String>();
if (cp != null) {
StringTokenizer tok = new StringTokenizer(cp, File.pathSeparator);
while (tok.hasMoreTokens()) {
public void acceptResult(IUnwovenClassFile result) {
if (wovenClass == null) {
wovenClass = result;
-
String name = result.getClassName();
if (shouldDump(name.replace('/', '.'), false)) {
dump(name, result.getBytes(), false);
}
- }
-
- /* Classes generated by weaver e.g. around closure advice */
- else {
+ } else {
+ // Classes generated by weaver e.g. around closure advice
String className = result.getClassName();
generatedClasses.put(className, result);
generatedClasses.put(wovenClass.getClassName(), result);
};
}
}
+
+ public void setActiveProtectionDomain(ProtectionDomain protectionDomain) {
+ activeProtectionDomain = protectionDomain;
+ }
}
\ No newline at end of file