]> source.dussan.org Git - aspectj.git/commitdiff
Modified access to onType to be via a get/set pair - enabling me to get in and do...
authoraclement <aclement>
Thu, 18 Aug 2005 07:51:03 +0000 (07:51 +0000)
committeraclement <aclement>
Thu, 18 Aug 2005 07:51:03 +0000 (07:51 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/parser/DeclarationFactory.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java

index 79777a7671be77aaf8c2188d99656147b68d4b6a..b8eeb4a855d90e2aea11fdd04fad674d723e2727 100644 (file)
@@ -44,7 +44,7 @@ import org.aspectj.weaver.Shadow;
  * @author Jim Hugunin
  */
 public abstract class InterTypeDeclaration extends AjMethodDeclaration {
-       public TypeReference onType;
+       protected TypeReference onType;
        protected ReferenceBinding onTypeBinding;
        protected List phantomTypeVariableToRealIndex;
 
@@ -273,5 +273,13 @@ public abstract class InterTypeDeclaration extends AjMethodDeclaration {
        public char[] getDeclaredSelector() {
                return declaredSelector;
        }
+       
+       public void setOnType(TypeReference onType) {
+               this.onType = onType;
+       }
+       
+       public TypeReference getOnType() {
+               return onType;
+       }
 
 }
index 250e791f052e07c11dea68aae43333e8f6c784ad..750f6997db9414fc18db8c5d20f64fd329e3d178 100644 (file)
@@ -258,7 +258,7 @@ public class DeclarationFactory implements IDeclarationFactory {
         * @see org.eclipse.jdt.internal.compiler.parser.Parser.IDeclarationFactory#setOnType(org.eclipse.jdt.internal.compiler.ast.MethodDeclaration, org.eclipse.jdt.internal.compiler.ast.TypeReference)
         */
        public void setOnType(MethodDeclaration interTypeDecl, TypeReference onType) {
-               ((InterTypeDeclaration)interTypeDecl).onType = onType;  
+               ((InterTypeDeclaration)interTypeDecl).setOnType(onType);        
        }
 
        /* (non-Javadoc)
index 756a2bc6af16680d434c62f8c5553d6046806304..8dab02aec770f50324724f9a9a23e84a62b0ea95 100644 (file)
@@ -185,7 +185,7 @@ public class AsmElementFormatter {
                        
                } else if (methodDeclaration instanceof InterTypeDeclaration) {
                        InterTypeDeclaration itd = (InterTypeDeclaration)methodDeclaration;
-                       String name = itd.onType.toString() + "." + new String(itd.getDeclaredSelector()); 
+                       String name = itd.getOnType().toString() + "." + new String(itd.getDeclaredSelector()); 
                        if (methodDeclaration instanceof InterTypeFieldDeclaration) {
                                node.setKind(IProgramElement.Kind.INTER_TYPE_FIELD);
                                node.setName(name);
@@ -206,7 +206,7 @@ public class AsmElementFormatter {
 //                             }
 //                             argumentsSignature.append(")");
 //                             InterTypeConstructorDeclaration itcd = (InterTypeConstructorDeclaration)methodDeclaration;                              
-                               node.setName(itd.onType.toString() + "." + itd.onType.toString()/*+argumentsSignature.toString()*/);
+                               node.setName(itd.getOnType().toString() + "." + itd.getOnType().toString()/*+argumentsSignature.toString()*/);
                        } else {
                                node.setKind(IProgramElement.Kind.ERROR);
                                node.setName(name);