Package adams.core

Class StaticClassLister

  • All Implemented Interfaces:
    Serializable

    public class StaticClassLister
    extends Object
    implements Serializable
    Loads class names listed in props files, for cases when dynamic class discovery is not available (e.g., JUnit tests).
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Method Detail

      • getClassnames

        public String[] getClassnames​(String propsfile,
                                      String key)
        Loads the classnames from all propsfiles that can be found with the classloader, using the specified key.
        Parameters:
        propsfile - the resource (properties file) to look for
        key - the key in the props file to retrieve the classnames from
        Returns:
        the retrieved classnames
      • locate

        protected List<URL> locate​(String resource)
        Locates the resource and returns the URLs.
        Parameters:
        resource - the resource to locate
        Returns:
        the URLs the resource was found at
      • getClassnames

        public String[] getClassnames​(List<String> propsfiles,
                                      String key)
        Loads the classnames from all propsfiles that can be found with the classloader, using the specified key.
        Parameters:
        propsfiles - the resources (properties file) to look for
        key - the key in the props files to retrieve the classnames from
        Returns:
        the retrieved classnames
      • getClassnames

        public String[] getClassnames​(String[] propsfiles,
                                      String key)
        Loads the classnames from all propsfiles that can be found with the classloader, using the specified key.
        Parameters:
        propsfiles - the resources (properties file) to look for
        key - the key in the props files to retrieve the classnames from
        Returns:
        the retrieved classnames
      • getSingleton

        public static StaticClassLister getSingleton()
        Returns the singleton instance.
        Returns:
        the singleton