public class ClassUtils extends Object
| Modifier and Type | Field | Description |
|---|---|---|
static Class<?> |
COLLECTION_CLASS |
|
static Class<?> |
COMPONENTS_SERVICE_OBJECTS_CLASS |
|
static Class<?> |
LIST_CLASS |
|
static org.osgi.util.tracker.ServiceTracker<?,?> |
m_packageAdmin |
|
static Class<?> |
MAP_CLASS |
|
static Class<?> |
MAP_ENTRY_CLASS |
|
static Class<?> |
SERVICE_REFERENCE_CLASS |
| Constructor | Description |
|---|---|
ClassUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
close() |
|
static Class<?> |
getClassFromComponentClassLoader(Class<?> componentClass,
String className,
SimpleLogger logger) |
Returns the class object representing the class of the field reference
The class loader of the component class is used to load the service class.
|
static Object |
getPackageAdmin() |
|
static void |
setBundleContext(org.osgi.framework.BundleContext bundleContext) |
public static final Class<?> SERVICE_REFERENCE_CLASS
public static final Class<?> COMPONENTS_SERVICE_OBJECTS_CLASS
public static final Class<?> MAP_CLASS
public static final Class<?> MAP_ENTRY_CLASS
public static final Class<?> COLLECTION_CLASS
public static final Class<?> LIST_CLASS
public static volatile org.osgi.util.tracker.ServiceTracker<?,?> m_packageAdmin
public static Class<?> getClassFromComponentClassLoader(Class<?> componentClass, String className, SimpleLogger logger)
It may well be possible, that the class loader of the target class cannot see the service object class, for example if the service reference is inherited from a component class of another bundle.
null
if the class loader of the targetClass cannot see that
class.public static void setBundleContext(org.osgi.framework.BundleContext bundleContext)
public static Object getPackageAdmin()
public static void close()
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.