Example usage for org.apache.wicket.util.collections UrlExternalFormComparator UrlExternalFormComparator

List of usage examples for org.apache.wicket.util.collections UrlExternalFormComparator UrlExternalFormComparator

Introduction

In this page you can find the example usage for org.apache.wicket.util.collections UrlExternalFormComparator UrlExternalFormComparator.

Prototype

UrlExternalFormComparator

Source Link

Usage

From source file:codetroopers.wicket.HotReloadingClassResolver.java

License:Apache License

@Override
public Iterator<URL> getResources(final String name) {
    Set<URL> resultSet = new TreeSet<URL>(new UrlExternalFormComparator());

    try {/*  w w w .ja va 2 s .  com*/
        // Try the classloader for the wicket jar/bundle
        Enumeration<URL> resources = Application.class.getClassLoader().getResources(name);
        loadResources(resources, resultSet);

        // Try the classloader for the user's application jar/bundle
        resources = Application.get().getClass().getClassLoader().getResources(name);
        loadResources(resources, resultSet);

        // Try the context class loader
        resources = getClassLoader().getResources(name);
        loadResources(resources, resultSet);
    } catch (Exception e) {
        throw new WicketRuntimeException(e);
    }

    return resultSet.iterator();
}