Package org.apache.commons.discovery.listeners

Examples of org.apache.commons.discovery.listeners.GatherResourcesListener


    }

    public void execute() throws Exception {
        System.out.println("XXX ");
       
        GatherResourcesListener listener = new GatherResourcesListener();
        DiscoverResources disc = new DiscoverResources();
        disc.addClassLoader( JDKHooks.getJDKHooks().getThreadContextClassLoader() );
        disc.addClassLoader( this.getClass().getClassLoader() );
        disc.setListener(listener);
        disc.find(name);

        Vector vector = listener.getResources();
        drivers = new String[vector.size()];
        for (int i = 0; i < vector.size(); i++) {
            drivers[i] = ((Resource)vector.get(i)).getName();
            if( debug > 0 ) {
                System.out.println("Found " + drivers[i]);
View Full Code Here

TOP

Related Classes of org.apache.commons.discovery.listeners.GatherResourcesListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.