com.android.tools.lint.detector.api.Location.reverse()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中com.android.tools.lint.detector.api.Location.reverse()方法的一些代码示例,展示了Location.reverse()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Location.reverse()方法的具体详情如下:
包路径:com.android.tools.lint.detector.api.Location
类名称:Location
方法名:reverse

Location.reverse介绍

[英]Reverses the secondary location list initiated by the given location
[中]反转由给定位置启动的辅助位置列表

代码示例

代码示例来源:origin: com.android.tools.lint/lint-checks

private void reportMap(Context context, Issue issue, Map<String, Location> map) {
  if (map != null) {
    for (Map.Entry<String, Location> entry : map.entrySet()) {
      Location location = entry.getValue();
      String name = entry.getKey();
      String message = mDescriptions.get(name);
      if (location == null) {
        location = Location.create(context.getProject().getDir());
      }
      // We were prepending locations, but we want to prefer the base folders
      location = Location.reverse(location);
      context.report(issue, location, message);
    }
  }
}

代码示例来源:origin: com.amazon.device.tools.lint/lint-checks

private void reportMap(Context context, Issue issue, Map<String, Location> map) {
  if (map != null) {
    for (Map.Entry<String, Location> entry : map.entrySet()) {
      Location location = entry.getValue();
      String name = entry.getKey();
      String message = mDescriptions.get(name);
      if (location == null) {
        location = Location.create(context.getProject().getDir());
      }
      // We were prepending locations, but we want to prefer the base folders
      location = Location.reverse(location);
      context.report(issue, location, message);
    }
  }
}

代码示例来源:origin: com.amazon.device.tools.lint/lint-checks

location = Location.reverse(location);

代码示例来源:origin: com.android.tools.lint/lint-checks

location = Location.reverse(location);

代码示例来源:origin: com.amazon.device.tools.lint/lint-checks

if (location != null) {
  location = Location.reverse(location);

代码示例来源:origin: com.android.tools.lint/lint-checks

if (location != null) {
  location = Location.reverse(location);

相关文章