]> source.dussan.org Git - aspectj.git/commitdiff
refactor hasThis kind of things
authorjhugunin <jhugunin>
Tue, 31 Dec 2002 00:53:16 +0000 (00:53 +0000)
committerjhugunin <jhugunin>
Tue, 31 Dec 2002 00:53:16 +0000 (00:53 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseShadow.java

index 3fbf2203d9e0e6cdd40127328670bbe0787a7bd9..f29c5c0fdf910a21e43cbe5f42ad90d3aa6dfc43 100644 (file)
@@ -22,6 +22,13 @@ import org.eclipse.jdt.internal.compiler.ast.*;
 import org.eclipse.jdt.internal.compiler.ast.AstNode;
 import org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
 
+/**
+ * This is only used for declare soft right now.
+ * 
+ * It might be used for other compile-time matching, but in all such cases
+ * this and target pcds can't be used.  We might not behave correctly in
+ * such cases.
+ */
 public class EclipseShadow extends Shadow {
        EclipseWorld world;
        AstNode astNode;
@@ -31,7 +38,7 @@ public class EclipseShadow extends Shadow {
        public EclipseShadow(EclipseWorld world, Kind kind, Member signature, AstNode astNode, 
                                                        ReferenceContext context)
        {
-               super(kind, signature);
+               super(kind, signature, null);
                this.world = world;
                this.astNode = astNode;
                //XXX can this fail in practice?
@@ -42,16 +49,9 @@ public class EclipseShadow extends Shadow {
                return world;
        }
 
-       public boolean hasThis() {
-               return !enclosingMethod.isStatic();  //XXX what about pre-initialization
-       }
-
-       public TypeX getThisType() {
-               return world.fromBinding(enclosingMethod.binding.declaringClass);
-       }
 
        public TypeX getEnclosingType() {
-               return getThisType();  //??? why is this different from the above
+               return world.fromBinding(enclosingMethod.binding.declaringClass);
        }
        
        public SourceLocation getSourceLocation() {