Esempio n. 1
0
  protected void checkMethod(JavaMethod d) {
    enclosingScopes.push(d);

    checkStatement(d.body());

    enclosingScopes.pop();
  }
Esempio n. 2
0
  protected void checkClass(JavaClass c) {
    enclosingScopes.push(c);

    for (Decl d : c.declarations()) {
      checkDeclaration(d);
    }

    enclosingScopes.pop();
  }
Esempio n. 3
0
  protected void checkInterface(JavaInterface c) {
    enclosingScopes.push(c);

    for (Decl d : c.declarations()) {
      checkDeclaration(d);
    }

    enclosingScopes.pop();
  }
Esempio n. 4
0
 protected Decl getEnclosingScope(Class c) {
   for (int i = enclosingScopes.size() - 1; i >= 0; --i) {
     Decl d = enclosingScopes.get(i);
     if (c.isInstance(d)) {
       return d;
     }
   }
   return null;
 }