Example #1
0
        ///
        ///	 <summary> * add a walker to this and make sure that abstract walkers are sorted at the end of the list so that superclass
        ///	 * walkers are always found first called by BaseWorker so no need for external calls
        ///	 *  </summary>
        ///	 * <param name="w"> the walker to add </param>
        ///
        internal virtual void addWalker(BaseWalker w)
        {
            int d = w.getDepth();

            maxDepth = d > maxDepth ? d : maxDepth;
            v.Add(w);
            v.Sort();
        }
Example #2
0
        //
        //	 * (non-Javadoc)
        //	 *
        //	 * @see org.cip4.jdflib.elementwalker.IWalkerFactory#getWalkers(org.cip4.jdflib .core.KElement)
        //
        public virtual IWalker getWalker(KElement toCheck)
        {
            int vs = v.Count;

            for (int j = 0; j < vs; j++)
            {
                BaseWalker w = v[j];
                if (w.matches(toCheck))
                {
                    return(w);
                }
            }

            return(null);
        }