@Override
public Transformation reverse() throws NonReversibleValidationException {
if (mode != Mode.MAP_OR_FAIL && mode != Mode.MAP_OR_IGNORE) {
throw new NonReversibleValidationException(location, mode + " mode is not reversible");
}
BiMap<String, String> mapping;
try {
mapping = HashBiMap.create(this.mapping);
} catch (IllegalArgumentException e) {
throw new NonReversibleValidationException(location,
"Non-reversible mapping: " + e.getMessage());
}
return new TodoReplace(location, glob, todoTags, mode, mapping.inverse(), defaultString,
parallelizer);
}
TodoReplace.java 文件源码
java
阅读 38
收藏 0
点赞 0
评论 0
项目:copybara
作者:
评论列表
文章目录