public class OsgiClassResolver extends Object implements org.apache.wicket.application.IClassResolver
DefaultClassResolver
which uses the classloader of the current
Application class instead of the thread context classloader.
This resolver should be registered in the Application.init() method:
getApplicationSettings().setClassResolver(new OsgiClassResolver());The OsgiClassResolver is able to access all classes visible to the application bundle, which may not cover all use cases, but is a reasonable default.
Constructor and Description |
---|
OsgiClassResolver() |
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader() |
Iterator<URL> |
getResources(String name) |
Class<?> |
resolveClass(String classname) |
public final Class<?> resolveClass(String classname) throws ClassNotFoundException
resolveClass
in interface org.apache.wicket.application.IClassResolver
ClassNotFoundException
IClassResolver.resolveClass(java.lang.String)
public Iterator<URL> getResources(String name)
getResources
in interface org.apache.wicket.application.IClassResolver
IClassResolver.getResources(java.lang.String)
public ClassLoader getClassLoader()
getClassLoader
in interface org.apache.wicket.application.IClassResolver
Copyright © 2015. All rights reserved.