import org.aspectj.bridge.Constants;
import org.aspectj.util.LangUtil;
import org.aspectj.weaver.Lint;
+import org.aspectj.weaver.Lint.Kind;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.World;
-import org.aspectj.weaver.Lint.Kind;
import org.aspectj.weaver.bcel.BcelWeakClassLoaderReference;
import org.aspectj.weaver.bcel.BcelWeaver;
import org.aspectj.weaver.bcel.BcelWorld;
}
// still try to avoid ResolvedType if we have simple patterns
- String fastClassName = className.replace('/', '.').replace('$', '.');
+ String fastClassName = className.replace('/', '.');
for (String excludeStartsWithString : excludeStartsWith) {
if (fastClassName.startsWith(excludeStartsWithString)) {
return false;
}
}
}
+ fastClassName = fastClassName.replace('$', '.');
if (!excludeEndsWith.isEmpty()) {
for (String lastPiece : excludeEndsWith) {
package org.aspectj.weaver.loadtime;
import java.io.File;
+import java.lang.ref.Reference;
import java.lang.reflect.Field;
import java.net.URL;
import java.net.URLClassLoader;
import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.util.ClassPath;
import org.aspectj.apache.bcel.util.SyntheticRepository;
+import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.World;
import org.aspectj.weaver.World.TypeMap;
import org.aspectj.weaver.bcel.BcelWorld;
etime = System.currentTimeMillis();
System.out.println("Rejection " + (etime - stime) + "ms");
+ jc = getClassFrom("../loadtime/bin", "testdata.MessageService$$EnhancerByCGLIB$$6dd4e683");
+ byte[] bs3 = jc.getBytes();
+ boolean b = adaptor.accept("testdata.MessageService$$EnhancerByCGLIB$$6dd4e683", bs3);
+ assertFalse(b);
}
// TODO
}
}
+ @SuppressWarnings("unused")
private void printMaps(TypeMap map) {
printExpendableMap(map.getExpendableMap());
printMainMap(map.getMainMap());
}
- private void printExpendableMap(Map m) {
- for (Object o : m.keySet()) {
- String sig = (String) o;
+ private void printExpendableMap(Map<String, Reference<ResolvedType>> m) {
+ for (String sig : m.keySet()) {
System.out.println(sig + "=" + m.get(sig));
}
}
- private void printMainMap(Map m) {
+ private void printMainMap(Map<String, ResolvedType> m) {
for (Object o : m.keySet()) {
String sig = (String) o;
System.out.println(sig + "=" + m.get(sig));
static class TestWeavingContext extends DefaultWeavingContext {
- List testList = new ArrayList();
+ List<Definition> testList = new ArrayList<Definition>();
public TestWeavingContext(ClassLoader loader) {
super(loader);
}
@Override
- public List getDefinitions(final ClassLoader loader, final WeavingAdaptor adaptor) {
+ public List<Definition> getDefinitions(final ClassLoader loader, final WeavingAdaptor adaptor) {
return testList;
}
}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2009 Contributors.
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andy Clement
+ *******************************************************************************/
+package testdata;
+
+public class MessageService$$EnhancerByCGLIB$$6dd4e683 {
+
+}