public void addExportedPackages ( String ... exportedPackages ) { String oldBundles = mainAttributes . get ( EXPORT_PACKAGE ) ; if ( oldBundles == null ) oldBundles = "" ; BundleList oldResultList = BundleList . fromInput ( oldBundles , newline ) ; BundleList resultList = BundleList . fromInput ( oldBundles , newline ) ; for ( String bundle : exportedPackages ) resultList . mergeInto ( Bundle . fromInput ( bundle ) ) ; String result = resultList . toString ( ) ; boolean changed = ! oldResultList . toString ( ) . equals ( result ) ; modified |= changed ; if ( changed ) mainAttributes . put ( EXPORT_PACKAGE , result ) ; }
Add the list with given bundles to the Export - Package main attribute .