summaryrefslogtreecommitdiffstats
path: root/aspectj5rt
diff options
context:
space:
mode:
Diffstat (limited to 'aspectj5rt')
-rw-r--r--aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java36
-rw-r--r--aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeMethodDeclarationImpl.java4
2 files changed, 7 insertions, 33 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 54c500801..482ccebb9 100644
--- a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java
+++ b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java
@@ -662,17 +662,12 @@ public class AjTypeImpl<T> implements AjType<T> {
for (Field f : clazz.getDeclaredFields()) {
if (!f.getType().isInterface()) continue;
if (!Modifier.isPublic(f.getModifiers()) || !Modifier.isStatic(f.getModifiers())) continue;
- if (f.isAnnotationPresent(org.aspectj.lang.annotation.DeclareParents.class)) {
- Class itdSource = f.getType();
- try {
- itdSource = f.get(null).getClass();
- } catch (IllegalAccessException ex) {
- //
- }
- for (Method itdM : itdSource.getDeclaredMethods()) {
+ if (f.isAnnotationPresent(org.aspectj.lang.annotation.DeclareParents.class)) {
+ for (Method itdM : f.getType().getDeclaredMethods()) {
if (!Modifier.isPublic(itdM.getModifiers()) && publicOnly) continue;
InterTypeMethodDeclaration itdm = new InterTypeMethodDeclarationImpl(
- this, AjTypeSystem.getAjType(f.getType()), itdM
+ this, AjTypeSystem.getAjType(f.getType()), itdM,
+ Modifier.PUBLIC
);
toList.add(itdm);
}
@@ -684,28 +679,7 @@ public class AjTypeImpl<T> implements AjType<T> {
private void addAnnotationStyleITDFields(List<InterTypeFieldDeclaration> toList, boolean publicOnly) {
//AV: I think it is meaningless
//@AJ decp is interface driven ie no field
- // AMC: private fields in the mixin type should show as ITDs private to the aspect...
- if (isAspect()) {
- for (Field f : clazz.getDeclaredFields()) {
- if (!f.getType().isInterface()) continue;
- if (!Modifier.isPublic(f.getModifiers()) || !Modifier.isStatic(f.getModifiers())) continue;
- if (f.isAnnotationPresent(org.aspectj.lang.annotation.DeclareParents.class)) {
- Class itdSource = f.getType();
- try {
- itdSource = f.get(null).getClass();
- } catch (IllegalAccessException ex) {
- //
- }
- for (Field itdF : itdSource.getDeclaredFields()) {
- if (!Modifier.isPublic(itdF.getModifiers()) && publicOnly) continue;
- InterTypeFieldDeclaration itdf = new InterTypeFieldDeclarationImpl(
- this, AjTypeSystem.getAjType(f.getType()), itdF
- );
- toList.add(itdf);
- }
- }
- }
- }
+ return;
}
/* (non-Javadoc)
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 2ed2f89cf..eb085a055 100644
--- a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeMethodDeclarationImpl.java
+++ b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/InterTypeMethodDeclarationImpl.java
@@ -47,8 +47,8 @@ public class InterTypeMethodDeclarationImpl extends InterTypeDeclarationImpl
this.baseMethod = itdInterMethod;
}
- public InterTypeMethodDeclarationImpl(AjType<?> decType, AjType<?> targetType, Method base) {
- super(decType,targetType,base.getModifiers());
+ public InterTypeMethodDeclarationImpl(AjType<?> decType, AjType<?> targetType, Method base, int modifiers) {
+ super(decType,targetType,modifiers);
this.parameterAdjustmentFactor = 0;
this.name = base.getName();
this.baseMethod = base;