public static Import findImportByExportingInstance ( Collection < Import > imports , String exportingInstancePath ) { Import result = null ; if ( imports != null && exportingInstancePath != null ) { for ( Import imp : imports ) { if ( exportingInstancePath . equals ( imp . getInstancePath ( ) ) ) { result = imp ; break ; } } } return result ; }
Finds a specific import from the path of the instance that exports it .