Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (c) 2010 Dmytro Pishchukhin (http://osgilab.org)
  * This program is made available under the terms of the MIT License.
  */
 
 package org.osgilab.testing.commons.assertions;
 
 import  org.osgi.framework.BundleContext;

Abstract OSGi Asset class with BundleContext Handling

Author(s):
dpishchukhin
Version:
1.0
See also:
java.lang.AssertionError
org.osgi.framework.BundleContext
public abstract class OSGiAssert {
    
BundleContext value
    private static BundleContext bc;

    
Initialize all OSGi assertions with BundleContext value

Parameters:
bc BundleContext value
Throws:
IllegalStateException utility class is already initialized
    public static void init(BundleContext bc) {
        . = bc;
    }

    
Asserts BundleContext before return.

Returns:
BundleContext
    protected static BundleContext getBundleContext() {
        Assert.assertNotNull("BundleContext is null");
        return ;
    }
New to GrepCode? Check out our FAQ X