Package org.apache.commons.discovery

Examples of org.apache.commons.discovery.ResourceClass.loadClass()


            DiscoverClasses classDiscovery = new DiscoverClasses(loaders);
            ResourceClassIterator classes = classDiscovery.findResourceClasses(getDefaultName());
            if (classes.hasNext()) {
                ResourceClass info = classes.nextResourceClass();
                try {
                    defaultClass = info.loadClass();
                } catch (Exception e) {
                    // ignore
                }
            }
        }
View Full Code Here


        DiscoverClasses discovery = new DiscoverClasses(loaders);
        ResourceClassIterator iter = discovery.findResourceClasses(name);
        while (iter.hasNext()) {
            ResourceClass resource = iter.nextResourceClass();
            try {               
                Class implClass = resource.loadClass();
                if ( implClass != null ) {
                    assertEquals("org.apache.commons.discovery.test.TestImpl2_1", implClass.getName());
                    return;
                }
            }
View Full Code Here

*/
        ResourceClassIterator iter = discovery.findResourceClasses(name);
        while (iter.hasNext()) {
            ResourceClass resource = iter.nextResourceClass();
            try {
                Class typeClass = resource.loadClass();
                if ( typeClass != null ) {
                    return newInstance(uri, typeClass);
                }
            }
            catch (Exception e) {
View Full Code Here

*/
        ResourceClassIterator iter = discovery.findResourceClasses(name);
        while (iter.hasNext()) {
            ResourceClass resource = iter.nextResourceClass();
            try {
                Class typeClass = resource.loadClass();
                if ( typeClass != null ) {
                    return newInstance(uri, typeClass);
                }
            }
            catch (Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.