Package org.osgi.framework.connect
Interface FrameworkUtilHelper
-
@ConsumerType public interface FrameworkUtilHelper
A helper for theFrameworkUtilclass.This helper provides alternative implementations for methods on
FrameworkUtil.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.Optional<Bundle>getBundle(java.lang.Class<?> classFromBundle)Returns theBundleassociated with the specified class.
-
-
-
Method Detail
-
getBundle
default java.util.Optional<Bundle> getBundle(java.lang.Class<?> classFromBundle)
Returns theBundleassociated with the specified class.This helper method is called by
FrameworkUtil.getBundle(Class)if the standard implementation ofFrameworkUtilis unable to find the bundle.- Parameters:
classFromBundle- A class associated with a bundle.- Returns:
- An
Optionalcontaining theBundlefor the specified class, or an emptyOptionalif the specified class is not from a bundle.
-
-