All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ionic.sdk.core.res.Resource Maven / Gradle / Ivy

Go to download

The Ionic Java SDK provides an easy-to-use interface to the Ionic Platform.

There is a newer version: 2.9.0
Show newest version
package com.ionic.sdk.core.res;

import java.net.URL;

/**
 * Utilities to access classpath resources independent of the location of the resource.
 */
public final class Resource {

    /**
     * Constructor.
     * http://checkstyle.sourceforge.net/config_design.html#FinalClass
     */
    private Resource() {
    }

    /**
     * Finds the resource with the given name.
     * @param name the resource name
     * @return the URL of the requested resource, or null if not found
     */
    public static URL resolve(final String name) {
        final Thread thread = Thread.currentThread();
        final ClassLoader classLoader = thread.getContextClassLoader();
        return classLoader.getResource(name);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy