/** * Adds a class */ public InterpretedClassDef addClass(Location location, string name, string parentName, ArrayList <String> ifaceList, int index, bool isTop) { InterpretedClassDef existingClass = _classMap.get(name); string [] ifaces = new String[ifaceList.size()]; ifaceList.toArray(ifaces); InterpretedClassDef cl = _exprFactory.createClassDef(location, name, parentName, ifaces, index); if (existingClass == null) { _classMap.put(name, cl); } _parent.addConditionalClass(cl); return(cl); }
public ObjectMethod(ExprFactory exprFactory, Location location, InterpretedClassDef quercusClass, string name, FunctionInfo info, Arg [] argList, Statement [] statementList) { super(exprFactory, location, name, info, argList, statementList); _quercusClass = quercusClass; }
public ThisMethodExpr(Location location, ThisExpr qThis, StringValue methodName, ArrayList <Expr> args) { super(location, qThis, methodName, args); _classDef = qThis.getClassDef(); _hashCodeInsensitive = methodName.hashCodeCaseInsensitive(); }
/* * Adds a conditional class. */ protected void addConditionalClass(InterpretedClassDef def) { if (_conditionalClassMap == null) { _conditionalClassMap = new HashMap <String, InterpretedClassDef>(1); } _conditionalClassMap.put(def.getCompilationName(), def); _parent.addConditionalClass(def); }
/** * Adds a class */ public InterpretedClassDef addClass(Location location, string name, string parentName, ArrayList <String> ifaceList, int index, bool isTop) { InterpretedClassDef cl = null; if (isTop) { cl = _classMap.get(name); } if (cl == null) { string [] ifaces = new String[ifaceList.size()]; ifaceList.toArray(ifaces); cl = _exprFactory.createClassDef(location, name, parentName, ifaces, index); if (isTop) { cl.setTopScope(true); _classMap.put(name, cl); } } else { // class statically redeclared // XXX: should throw a runtime error? // dummy classdef for parsing only cl = _exprFactory.createClassDef(location, name, parentName, new String[0], index); } _classList.add(cl); return(cl); }
public ThisExpr(InterpretedClassDef classDef) { _classDef = classDef; }
/** * Adds a conditional class. */ abstract protected void addConditionalClass(InterpretedClassDef def);
public ClassDefStatement(Location location, InterpretedClassDef cl) { super(location); _cl = cl; }
/** * Adds a class */ protected void addConditionalClass(InterpretedClassDef def) { _classList.add(def); }
public ClassScope(InterpretedClassDef cl) { _cl = cl; }
/* * Adds a conditional class. */ protected void addConditionalClass(InterpretedClassDef def) { throw new UnsupportedOperationException(); }