summaryrefslogtreecommitdiffstats
path: root/aspectj5rt/java5-src
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-11-21 22:05:46 +0000
committeracolyer <acolyer>2005-11-21 22:05:46 +0000
commit735d94f91a02e08bf5a1a86185b9318de4bd4319 (patch)
treecb061b2d84a35814df99d88569ff89ce5a2ba172 /aspectj5rt/java5-src
parente5c3e7214edf3cd2ec84bc1e2b20ba93887b013a (diff)
downloadaspectj-735d94f91a02e08bf5a1a86185b9318de4bd4319.tar.gz
aspectj-735d94f91a02e08bf5a1a86185b9318de4bd4319.zip
tests and fix for pr114332 - reflection api not detecting abstract itdms.
Diffstat (limited to 'aspectj5rt/java5-src')
-rw-r--r--aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java2
-rw-r--r--aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeConstructorDeclarationImpl.java19
-rw-r--r--aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeDeclarationImpl.java2
-rw-r--r--aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeFieldDeclarationImpl.java12
-rw-r--r--aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeMethodDeclarationImpl.java22
5 files changed, 55 insertions, 2 deletions
diff --git a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java
index 1301a951d..60db9a2ba 100644
--- a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java
+++ b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java
@@ -585,7 +585,7 @@ public class AjTypeImpl<T> implements AjType<T> {
List<InterTypeMethodDeclaration> itdms = new ArrayList<InterTypeMethodDeclaration>();
Method[] baseMethods = clazz.getDeclaredMethods();
for (Method m : baseMethods) {
- if (!m.getName().contains("ajc$interMethod$")) continue;
+ if (!m.getName().contains("ajc$interMethodDispatch1$")) continue;
if (m.isAnnotationPresent(ajcITD.class)) {
ajcITD ann = m.getAnnotation(ajcITD.class);
InterTypeMethodDeclaration itdm =
diff --git a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeConstructorDeclarationImpl.java b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeConstructorDeclarationImpl.java
index 7a84c7d12..9b80263a3 100644
--- a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeConstructorDeclarationImpl.java
+++ b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeConstructorDeclarationImpl.java
@@ -77,5 +77,24 @@ public class InterTypeConstructorDeclarationImpl extends
}
return ret;
}
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ sb.append(java.lang.reflect.Modifier.toString(getModifiers()));
+ sb.append(" ");
+ sb.append(this.targetTypeName);
+ sb.append(".new");
+ sb.append("(");
+ AjType<?>[] pTypes = getParameterTypes();
+ for(int i = 0; i < (pTypes.length - 1); i++) {
+ sb.append(pTypes[i].toString());
+ sb.append(", ");
+ }
+ if (pTypes.length > 0) {
+ sb.append(pTypes[pTypes.length -1].toString());
+ }
+ sb.append(")");
+ return sb.toString();
+ }
}
diff --git a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeDeclarationImpl.java b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeDeclarationImpl.java
index a3def1030..b4bb23aab 100644
--- a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeDeclarationImpl.java
+++ b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeDeclarationImpl.java
@@ -21,7 +21,7 @@ import org.aspectj.lang.reflect.InterTypeDeclaration;
public class InterTypeDeclarationImpl implements InterTypeDeclaration {
private AjType<?> declaringType;
- private String targetTypeName;
+ protected String targetTypeName;
private AjType<?> targetType;
private int modifiers;
diff --git a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeFieldDeclarationImpl.java b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeFieldDeclarationImpl.java
index 5cca0b360..2370919c0 100644
--- a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeFieldDeclarationImpl.java
+++ b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeFieldDeclarationImpl.java
@@ -74,5 +74,17 @@ public class InterTypeFieldDeclarationImpl extends InterTypeDeclarationImpl
public Type getGenericType() {
return this.genericType;
}
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ sb.append(java.lang.reflect.Modifier.toString(getModifiers()));
+ sb.append(" ");
+ sb.append(getType().toString());
+ sb.append(" ");
+ sb.append(this.targetTypeName);
+ sb.append(".");
+ sb.append(getName());
+ return sb.toString();
+ }
}
diff --git a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeMethodDeclarationImpl.java b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeMethodDeclarationImpl.java
index 25688441d..2ed2f89cf 100644
--- a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeMethodDeclarationImpl.java
+++ b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeMethodDeclarationImpl.java
@@ -122,5 +122,27 @@ public class InterTypeMethodDeclarationImpl extends InterTypeDeclarationImpl
}
return ret;
}
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ sb.append(java.lang.reflect.Modifier.toString(getModifiers()));
+ sb.append(" ");
+ sb.append(getReturnType().toString());
+ sb.append(" ");
+ sb.append(this.targetTypeName);
+ sb.append(".");
+ sb.append(getName());
+ sb.append("(");
+ AjType<?>[] pTypes = getParameterTypes();
+ for(int i = 0; i < (pTypes.length - 1); i++) {
+ sb.append(pTypes[i].toString());
+ sb.append(", ");
+ }
+ if (pTypes.length > 0) {
+ sb.append(pTypes[pTypes.length -1].toString());
+ }
+ sb.append(")");
+ return sb.toString();
+ }
}