Package org.osgi.framework.connect
Interface FrameworkUtilHelper
-
@ConsumerType public interface FrameworkUtilHelper
A helper for theFrameworkUtil
class.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 theBundle
associated with the specified class.
-
-
-
Method Detail
-
getBundle
default java.util.Optional<Bundle> getBundle(java.lang.Class<?> classFromBundle)
Returns theBundle
associated with the specified class.This helper method is called by
FrameworkUtil.getBundle(Class)
if the standard implementation ofFrameworkUtil
is unable to find the bundle.- Parameters:
classFromBundle
- A class associated with a bundle.- Returns:
- An
Optional
containing theBundle
for the specified class, or an emptyOptional
if the specified class is not from a bundle.
-
-