1 26 27 package org.objectweb.openccm.ast.lib; 28 29 30 import org.objectweb.openccm.ast.api.Declaration; 31 32 33 import org.objectweb.openccm.ast.api.Scope; 34 35 48 49 public class ScopeListImpl 50 extends ListBaseImpl 51 { 52 58 64 67 public 68 ScopeListImpl() 69 { 70 super(); 72 } 73 74 80 86 93 public Declaration 94 find(String name) 95 { 96 for(java.util.Iterator it = iterator(); it.hasNext(); ) 98 { 99 Scope scope = (Scope)it.next(); 101 102 Declaration decl = scope.find(name); 104 105 if (decl != null) return decl; 107 } 108 109 return null; 111 } 112 113 118 public void 119 addScope(Scope scope) 120 { 121 super.addObject(scope); 122 } 123 124 129 public Scope[] 130 getScopes() 131 { 132 return (Scope[])super.toArray(new Scope[0]); 133 } 134 } 135 | Popular Tags |