Top Description Inners Fields Constructors Methods
org.osgi.framework

public Class FrameworkUtil

extends Object
Class Inheritance
Static Imports
java.util.Objects.requireNonNull

Framework Utility class.

This class contains utility methods which access Framework functions that may be useful to bundles.

Author
$Id: 71423feb17277b685e6d5d7864907e768da8cd0b $
Since
1.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
FrameworkUtil.DNChainMatching

This class contains a method to match a distinguished name (DN) chain against and DN chain pattern.

private static class

Field Summary

Modifier and TypeField and Description
private static final List<FrameworkUtilHelper>

Constructor Summary

AccessConstructor and Description
private
FrameworkUtil()

FrameworkUtil objects may not be constructed.

Method Summary

Modifier and TypeMethod and Description
public static <
The type of the key.
K
,
The type of the value.
V
>
Dictionary<K, V>

Returns:

A Dictionary object which wraps the specified map. If the specified map can be cast to a Dictionary, then the specified map is returned.
asDictionary
(Map<? extends K, ? extends V>
The map to wrap.
map
)

Return a Dictionary wrapper around a Map.

public static <
The type of the key.
K
,
The type of the value.
V
>
Map<K, V>

Returns:

A Map object which wraps the specified dictionary. If the specified dictionary can be cast to a Map, then the specified dictionary is returned.
asMap
(Dictionary<? extends K, ? extends V>
The dictionary to wrap.
dictionary
)

Return a Map wrapper around a Dictionary.

public static Filter

Returns:

A Filter object encapsulating the filter string.
createFilter
(String
The filter string.
filter
)

Creates a Filter object.

public static Optional<Bundle>

Returns:

An Optional containing Bundle for the specified bundle class loader or an empty Optional if the specified class loader is not associated with a specific bundle.
getBundle
(ClassLoader
A bundle class loader.
bundleClassLoader
)

Return a Bundle for the specified bundle class loader.

public static Bundle

Returns:

A Bundle for the specified bundle class or null if the specified class was not defined by a bundle.
getBundle
(Class<?>
A class defined by a bundle.
classFromBundle
)

Return a Bundle for the specified bundle class.

public static boolean

Returns:

true If the pattern matches the DN chain; otherwise false is returned.
matchDistinguishedNameChain
(String
The pattern against which to match the DN chain.
matchPattern
,
List<String>
The DN chain to match against the specified pattern. Each element of the chain must be of type String and use the format defined in RFC 2253.
dnChain
)

Match a Distinguished Name (DN) chain against a pattern.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait