Search Java Code Snippets


  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.





Java - Code Samples

 Sample 1. Code Sample / Example / Snippet of org.apache.felix.framework.wiring.BundleRequirementImpl

    private static List<BundleRevision> getResolvedSingletons(ResolverState state)

{

BundleRequirementImpl req = new BundleRequirementImpl(

null,

BundleCapabilityImpl.SINGLETON_NAMESPACE,

Collections.EMPTY_MAP,

Collections.EMPTY_MAP);

SortedSet<BundleCapability> caps = state.getCandidates(req, true);

List<BundleRevision> singletons = new ArrayList<>();

for (BundleCapability cap : caps)

{

if (cap.getRevision().getWiring() != null)

{

singletons.add(cap.getRevision());

}

}

return singletons;

}


   Like      Feedback      org.apache.felix.framework.wiring.BundleRequirementImpl



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner