]> source.dussan.org Git - aspectj.git/commitdiff
getCorrespondingType() fixed for itdf
authoraclement <aclement>
Sat, 6 Dec 2008 00:00:41 +0000 (00:00 +0000)
committeraclement <aclement>
Sat, 6 Dec 2008 00:00:41 +0000 (00:00 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java

index 8e85ac8855708cb1935cbcbe114b911eb674e535..8aa528ef16b44f0e5f0923120138477193f380bc 100644 (file)
@@ -29,6 +29,7 @@ import org.aspectj.ajdt.internal.compiler.ast.AdviceDeclaration;
 import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration;
 import org.aspectj.ajdt.internal.compiler.ast.DeclareDeclaration;
 import org.aspectj.ajdt.internal.compiler.ast.InterTypeDeclaration;
+import org.aspectj.ajdt.internal.compiler.ast.InterTypeFieldDeclaration;
 import org.aspectj.ajdt.internal.compiler.ast.PointcutDeclaration;
 import org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment;
 import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
@@ -505,7 +506,14 @@ public class AsmHierarchyBuilder extends ASTVisitor {
                        // methods, then we loose the type, for example int, for the field
                        // and instead get "void".
                        if (peNode.getKind().equals(IProgramElement.Kind.INTER_TYPE_FIELD)) {
-                               peNode.setCorrespondingType(methodDeclaration.returnType.toString());
+
+                               InterTypeFieldDeclaration itfd = (InterTypeFieldDeclaration) methodDeclaration;
+                               if (itfd.getRealFieldType() != null) {
+                                       peNode.setCorrespondingType(new String(itfd.getRealFieldType().readableName()));
+                               } else
+                                       peNode.setCorrespondingType(null);
+
+                               // was peNode.setCorrespondingType(methodDeclaration.returnType.toString());
                        } else {
                                if (methodDeclaration.returnType.resolvedType != null)
                                        peNode.setCorrespondingType(new String(methodDeclaration.returnType.resolvedType.readableName()));