diff options
author | aclement <aclement> | 2008-08-31 22:08:27 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-08-31 22:08:27 +0000 |
commit | ee77d7cdc0e0bb67abe21023e06fe18ea763a3b9 (patch) | |
tree | f1d5e1662e2688ad2c88c48068a7964426e2085f /org.aspectj.ajdt.core | |
parent | 74407d4cb10df42abcb685da3ffb26344849437b (diff) | |
download | aspectj-ee77d7cdc0e0bb67abe21023e06fe18ea763a3b9.tar.gz aspectj-ee77d7cdc0e0bb67abe21023e06fe18ea763a3b9.zip |
remove unused code
Diffstat (limited to 'org.aspectj.ajdt.core')
3 files changed, 45 insertions, 43 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDesignator.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDesignator.java index d5c8a0d2e..4feafc640 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDesignator.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDesignator.java @@ -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()); } diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java index b4ccb53a4..91c395823 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java @@ -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; diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java index c56182eff..60a92c6e5 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java @@ -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; |