1 /*2 * Copyright (C) MX4J.3 * All rights reserved.4 *5 * This software is distributed under the terms of the MX4J License version 1.0.6 * See the terms of the MX4J License in the documentation provided with this software.7 */8 9 package mx4j.loading;10 11 import java.security.SecureClassLoader ;12 import java.net.URL ;13 import java.io.InputStream ;14 15 import javax.management.loading.ClassLoaderRepository ;16 17 /**18 * A classloader that delegates to the ClassLoaderRepository19 *20 * @author <a HREF="mailto:biorn_steedom@users.sourceforge.net">Simone Bordet</a>21 * @version $Revision: 1.3 $22 */23 public class RepositoryClassLoader extends SecureClassLoader 24 {25 private ClassLoaderRepository repository;26 27 public RepositoryClassLoader(ClassLoaderRepository repository)28 {29 this.repository = repository;30 }31 32 public Class loadClass(String name) throws ClassNotFoundException 33 {34 return repository.loadClass(name);35 }36 }37