public final class IdMappingUtil extends Object
ReplaceIdGenerators
.Modifier and Type | Method and Description |
---|---|
static Map<String,com.google.common.collect.BiMap<String,String>> |
parseSerializedIdMappings(String idMappings)
The expected format looks like this:
|
public static Map<String,com.google.common.collect.BiMap<String,String>> parseSerializedIdMappings(String idMappings)
[generatorName1] someId1:someFile:theLine:theColumn ...
[[generatorName2] someId2:someFile:theLine:theColumn] ...
The returned data is grouped by generator name (the map key). The inner map provides
mappings from id to content (file, line and column info). In a glimpse, the structure is
Map<generator name, BiMap<id, value>>
.
@throws IllegalArgumentException malformed input where there it 1) has duplicate generator name, or 2) the line has no ':' for id and its content.
Copyright © 2009-2017 Google. All Rights Reserved.