Package adams.core

Class FindClass.Listener

  • All Implemented Interfaces:
    nz.ac.waikato.cms.locator.TraversalListener
    Enclosing class:
    FindClass

    public static class FindClass.Listener
    extends Object
    implements nz.ac.waikato.cms.locator.TraversalListener
    For collecting URLs.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • m_Search

        protected String m_Search
        the search string.
      • m_RegExp

        protected boolean m_RegExp
        whether search is a regular expression.
      • m_Matches

        protected List<URL> m_Matches
        the URLs that matched the search.
    • Constructor Detail

      • Listener

        public Listener​(String search,
                        boolean regExp)
        Initializes the collector.
        Parameters:
        search - the search string
        regExp - true if the search string is regular expression
    • Method Detail

      • traversing

        public void traversing​(String classname,
                               URL classPathPart)
        Gets called when a class is being traversed.
        Specified by:
        traversing in interface nz.ac.waikato.cms.locator.TraversalListener
        Parameters:
        classname - the current classname
        classPathPart - the current classpath part this classname is located in
      • getMatches

        public List<URL> getMatches()
        Returns the matches.
        Returns:
        the matches