@SuppressWarnings("rawtypes")
private void removePackages( Set clazzes, Set<String> packageNames )
{
for ( Object clazze : clazzes )
{
Clazz clazz = (Clazz) clazze;
String name = clazz.getName();
while ( name.contains( "." ) )
{
name = name.substring( 0, name.lastIndexOf( '.' ) );
if ( packageNames.add( name ) )
{
removable.remove( new Clazz( name + ".package-info" ) );
}
}
}
}