Ejemplo n.º 1
0
        /**
         * Creates a new save state.
         */
        SaveState(Env env,
                  AbstractFunction [] fun,
                  ClassDef [] classDef,
                  QuercusClass [] qClass,
                  Value [] constants,
                  Map <StringValue, Var> staticMap,
                  Map <StringValue, EnvVar> globalMap,
                  HashMap <Path, QuercusPage> includeMap,
                  ImportMap importMap)
        {
            _fun = new AbstractFunction[fun.length];
            System.arraycopy(fun, 0, _fun, 0, fun.length);

            _classDef = new ClassDef[classDef.length];
            System.arraycopy(classDef, 0, _classDef, 0, classDef.length);

            _qClass = new QuercusClass[qClass.length];
            System.arraycopy(qClass, 0, _qClass, 0, qClass.length);

            _const = new Value[constants.length];
            System.arraycopy(constants, 0, _const, 0, constants.length);

            saveStatics(env, staticMap);
            saveGlobals(env, globalMap);

            _includeMap = new HashMap <Path, QuercusPage>(includeMap);

            if (importMap != null)
            {
                _importMap = importMap.copy();
            }
        }
Ejemplo n.º 2
0
        public ImportMap copy()
        {
            ImportMap copy = new ImportMap();

            if (_qualifiedMap != null)
            {
                copy._qualifiedMap = new HashMap <String, String>(_qualifiedMap);
            }

            if (_wildcardList != null)
            {
                copy._wildcardList = new ArrayList <String>(_wildcardList);
            }

            if (_wildcardPhpList != null)
            {
                copy._wildcardPhpList = new ArrayList <String>(_wildcardPhpList);
            }

            return(copy);
        }