Function<Type, Iterable<Class<? extends Activator<?>>>> function = new Function<Type, Iterable<Class<? extends Activator<?>>>>()
{
@Override
public Iterable<Class<? extends Activator<?>>> map( Type type )
{
Activators activators = Annotations.annotationOn( type, Activators.class );
if( activators == null )
{
return Iterables.empty();
}
else
{
return Iterables.iterable( activators.value() );
}
}
};
Iterable<Class<? extends Activator<?>>> flatten = Iterables.flattenIterables( Iterables.map( function, allTypes ) );
return Iterables.toList( flatten );