1 29 30 package com.caucho.quercus.parser; 31 32 import com.caucho.quercus.env.StringValueImpl; 33 import com.caucho.quercus.expr.Expr; 34 import com.caucho.quercus.program.Function; 35 import com.caucho.quercus.program.InterpretedClassDef; 36 import com.caucho.util.L10N; 37 38 import java.util.ArrayList ; 39 40 43 public class ClassScope extends Scope { 44 private final static L10N L = new L10N(ClassScope.class); 45 46 private final InterpretedClassDef _cl; 47 48 public ClassScope(InterpretedClassDef cl) 49 { 50 _cl = cl; 51 } 52 53 57 public boolean isAbstract() 58 { 59 return _cl.isAbstract() || _cl.isInterface(); 60 } 61 62 65 public void addFunction(String name, Function function) 66 { 67 _cl.addFunction(name, function); 68 } 69 70 73 public void addVar(String name, Expr value) 74 { 75 _cl.addValue(new StringValueImpl(name), value); 76 } 77 78 81 public void addStaticVar(String name, Expr value) 82 { 83 _cl.addStaticValue(new StringValueImpl(name), value); 84 } 85 86 89 public void addConstant(String name, Expr value) 90 { 91 _cl.addConstant(name, value); 92 } 93 94 97 public InterpretedClassDef addClass(String name, 98 String parentName, 99 ArrayList <String > ifaceList) 100 { 101 throw new UnsupportedOperationException (); 102 } 103 } 104 105 | Popular Tags |