]> source.dussan.org Git - aspectj.git/commitdiff
remove unused code
authoraclement <aclement>
Sun, 31 Aug 2008 22:08:27 +0000 (22:08 +0000)
committeraclement <aclement>
Sun, 31 Aug 2008 22:08:27 +0000 (22:08 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDesignator.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java

index d5c8a0d2eb5cb772909baf0d5ad536708c316c79..4feafc640fb81edb23915e313f54fb853a5a14f9 100644 (file)
@@ -10,7 +10,6 @@
  *     PARC     initial implementation 
  * ******************************************************************/
 
-
 package org.aspectj.ajdt.internal.compiler.ast;
 
 import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
@@ -30,84 +29,87 @@ import org.aspectj.weaver.patterns.Pointcut;
 
 public class PointcutDesignator extends ASTNode {
        private Pointcut pointcut;
-    private PseudoTokens tokens; 
-    private boolean isError = false;
+       private PseudoTokens tokens;
+       private boolean isError = false;
 
        public PointcutDesignator(Parser parser, PseudoTokens tokens) {
                super();
                sourceStart = tokens.sourceStart;
                sourceEnd = tokens.sourceEnd;
                this.tokens = tokens;
-               
+
                Pointcut pc = tokens.parsePointcut(parser);
-               if (pc.toString().equals("")) { //??? is this a good signal
+               if (pc.toString().equals("")) { // ??? is this a good signal
                        isError = true;
                }
                pointcut = pc;
        }
-       
+
        // called by AtAspectJVisitor
        public PointcutDesignator(Pointcut pc) {
                this.pointcut = pc;
        }
-       
+
        public void postParse(TypeDeclaration typeDec, MethodDeclaration enclosingDec) {
                if (tokens != null)
                        tokens.postParse(typeDec, enclosingDec);
        }
 
-
-       public boolean finishResolveTypes(final AbstractMethodDeclaration dec, MethodBinding method, final int baseArgumentCount, SourceTypeBinding sourceTypeBinding) {
-               //System.err.println("resolving: " + this);
-               //Thread.currentThread().dumpStack();
-               //XXX why do we need this test
+       public boolean finishResolveTypes(final AbstractMethodDeclaration dec, MethodBinding method, final int baseArgumentCount,
+                       SourceTypeBinding sourceTypeBinding) {
+               // System.err.println("resolving: " + this);
+               // Thread.currentThread().dumpStack();
+               // XXX why do we need this test
                // AMC added concrete too. Needed because declare declarations concretize their
                // shadow mungers early.
-               if (pointcut.state == Pointcut.RESOLVED ||
-                       pointcut.state == Pointcut.CONCRETE) return true;
-               
+               if (pointcut.state == Pointcut.RESOLVED || pointcut.state == Pointcut.CONCRETE)
+                       return true;
+
                EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(dec.scope);
-               
+
                TypeBinding[] parameters = method.parameters;
                Argument[] arguments = dec.arguments;
 
-        FormalBinding[] bindings = new FormalBinding[baseArgumentCount];
-        for (int i = 0, len = baseArgumentCount; i < len; i++) {
-            Argument arg = arguments[i];
-            String name = new String(arg.name);
-            UnresolvedType type = world.fromBinding(parameters[i]);
-            bindings[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd, "unknown");
-        }
-        
-        EclipseScope scope = new EclipseScope(bindings, dec.scope);
-
-        pointcut = pointcut.resolve(scope);
-        return true;
+               FormalBinding[] bindings = new FormalBinding[baseArgumentCount];
+               for (int i = 0, len = baseArgumentCount; i < len; i++) {
+                       Argument arg = arguments[i];
+                       String name = new String(arg.name);
+                       UnresolvedType type = world.fromBinding(parameters[i]);
+                       bindings[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd);
+               }
+
+               EclipseScope scope = new EclipseScope(bindings, dec.scope);
+
+               pointcut = pointcut.resolve(scope);
+               return true;
        }
 
-    public Pointcut getPointcut() {
-        return pointcut;
-    }
-    
-    public String getPointcutDeclarationText() {
-       StringBuffer sb = new StringBuffer();
-       PseudoToken[] toks = tokens.tokens;
-       for (int i = 0; i < (toks.length -1); i++) {
+       public Pointcut getPointcut() {
+               return pointcut;
+       }
+
+       public String getPointcutDeclarationText() {
+               StringBuffer sb = new StringBuffer();
+               PseudoToken[] toks = tokens.tokens;
+               for (int i = 0; i < (toks.length - 1); i++) {
                        sb.append(toks[i].getString());
                        sb.append(" ");
                }
-       return sb.toString();
-    }
-    
+               return sb.toString();
+       }
+
        public boolean isError() {
                return isError;
        }
 
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuffer)
         */
        public StringBuffer print(int indent, StringBuffer output) {
-               if (pointcut == null) return output.append("<pcd>");
+               if (pointcut == null)
+                       return output.append("<pcd>");
                return output.append(pointcut.toString());
        }
 
index b4ccb53a41651c5bd03ef00172da1d5bcfa54ffb..91c395823600f5cb6b53d3eeb98d0dcd3f84a317 100644 (file)
@@ -432,7 +432,7 @@ public class ValidateAtAspectJAnnotationsVisitor extends ASTVisitor {
                                        || CharOperation.equals(proceedingJoinPoint, argTypeBinding.signature()) || name.equals(extraArgName)) {
                                ret[i] = new FormalBinding.ImplicitFormalBinding(type, name, i);
                        } else {
-                               ret[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd, "unknown");
+                               ret[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd);
                        }
                }
                return ret;
index c56182eff35bfd30df5814185a48275e433a3ff4..60a92c6e582f139d6d6420966ef44d9cae11e95e 100644 (file)
@@ -344,7 +344,7 @@ public class EclipseSourceType extends AbstractReferenceTypeDelegate {
                                        || CharOperation.equals(proceedingJoinPoint, argTypeBinding.signature()) || name.equals(extraArgName)) {
                                ret[i] = new FormalBinding.ImplicitFormalBinding(type, name, i);
                        } else {
-                               ret[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd, "unknown");
+                               ret[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd);
                        }
                }
                return ret;