1 24 25 package org.aspectj.compiler.base.cst; 26 27 import org.aspectj.compiler.base.ast.*; 28 import org.aspectj.compiler.base.*; 29 import java.util.*; 30 31 35 public abstract class Scope extends CompilerObject { 36 private Scope parent; 37 38 public Scope(JavaCompiler compiler, Scope parent) { 39 super(compiler); 40 this.parent = parent; 41 } 42 43 44 47 public final Scope getStackParent() { return parent; } 48 49 public Scope getParent() { return parent; } 50 51 public void setStackParent(Scope p) { parent = p; } 52 53 56 public Type findType(String name, ASTObject fromWhere) { 57 return getParent().findType(name, fromWhere); 58 } 59 60 64 public Expr bindUnqualifiedName(String name, ASTObject fromWhere) { 65 return getParent().bindUnqualifiedName(name, fromWhere); 66 } 67 68 76 public Type findMethodLookupType(String name, ASTObject fromWhere) { 77 return getParent().findMethodLookupType(name, fromWhere); 78 } 79 80 public String shortToString() { return "scope"; } 81 public String toString() { 82 String ret = this.shortToString(); 83 if (getStackParent() != null) ret += "<-" + getStackParent().toString(); 84 return ret; 85 } 86 } 87 | Popular Tags |