bundles/org.eclipse.packagedrone.repo.aspect/src/org/eclipse/packagedrone/repo/aspect/ChannelAspectProcessor.java
public static Map<String, ChannelAspectInformation> scanAspectInformations ( final BundleContext context )
    {
        Collection<ServiceReference<ChannelAspectFactory>> refs;
        try
        {
            refs = context.getServiceReferences ( ChannelAspectFactory.class, null );
        }
        catch ( final InvalidSyntaxException e )
        {
            // this should never happen since we don't specific a filter
            return Collections.emptyMap ();
        }

        if ( refs == null )
        {
            return Collections.emptyMap ();
        }

        final Map<String, ChannelAspectInformation> result = new HashMap<> ( refs.size () );

        for ( final ServiceReference<ChannelAspectFactory> ref : refs )
        {
            final ChannelAspectInformation info = makeInformation ( ref );
            result.put ( info.getFactoryId (), info );
        }

        return result;
    }
public static Map<String, ChannelAspectInformation> scanAspectInformations ( final BundleContext context )
    {
        Collection<ServiceReference<ChannelAspectFactory>> refs;
        try
        {
            refs = context.getServiceReferences ( ChannelAspectFactory.class, null );
        }
        catch ( final InvalidSyntaxException e )
        {
            // this should never happen since we don't specific a filter
            return Collections.emptyMap ();
        }

        if ( refs == null )
        {
            return Collections.emptyMap ();
        }

        final Map<String, ChannelAspectInformation> result = new HashMap<> ( refs.size () );

        for ( final ServiceReference<ChannelAspectFactory> ref : refs )
        {
            final ChannelAspectInformation info = makeInformation ( ref );
            result.put ( info.getFactoryId (), info );
        }

        return result;
    }
public static Map < String , ChannelAspectInformation > scanAspectInformations ( final BundleContext context ) { Collection < ServiceReference < ChannelAspectFactory >> refs ; try { refs = context . getServiceReferences ( ChannelAspectFactory . class , null ) ; } catch ( final InvalidSyntaxException e ) { // this should never happen since we don't specific a filter return Collections . emptyMap ( ) ; } if ( refs == null ) { return Collections . emptyMap ( ) ; } final Map < String , ChannelAspectInformation > result = new HashMap <> ( refs . size ( ) ) ; for ( final ServiceReference < ChannelAspectFactory > ref : refs ) { final ChannelAspectInformation info = makeInformation ( ref ) ; result . put ( info . getFactoryId ( ) , info ) ; } return result ; }
This actively scans for available aspects and returns their information
objects

@param context
the context to use
@return the result map, never returns <code>null</code>
This actively scans for available aspects and returns their information objects