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