blob: a430caf97a3940ebd7cadf122f4c750fa6bc3a51 [file] [log] [blame]
/**
* Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Florian Pirchner - Initial implementation
*/
package org.eclipse.osbp.runtime.common.types;
import org.osgi.framework.Bundle;
// TODO: Auto-generated Javadoc
/**
* A bundle space is a collection of bundles that expose their classes. Bundles
* with the bundle header <code>"OSBP-RuntimeBuilder-BundleSpace"</code> will be
* automatically added using the extender pattern.
*/
public interface IBundleSpace {
/**
* Tries to find a class for the given class name using the bundles
* registered in the bundle space.
*
* @param name
* the name
* @return the class
* @throws ClassNotFoundException
* the class not found exception
*/
Class<?> forName(String name) throws ClassNotFoundException;
/**
* Adds a new bundle to the bundle space. The bundle will be used to find
* classes.
*
* @param bundle
*/
void add(Bundle bundle);
/**
* Removes the bundle from the bundle space.
*
* @param bundle
*/
void remove(Bundle bundle);
}