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

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

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

Location.setClientData介绍

[英]Sets the client data associated with this location. This is an optional field which can be used by the creator of the Location to store temporary state associated with the location.
[中]设置与此位置关联的客户端数据。这是一个可选字段,可供位置创建者用于存储与位置关联的临时状态。

代码示例

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

for (Occurrence occurrence : occurrences) {
  Location location = context.getLocation(element);
  location.setClientData(element);
  location.setMessage(occurrence.message);
  location.setSecondary(occurrence.location);

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

for (Occurrence occurrence : occurrences) {
  Location location = context.getLocation(element);
  location.setClientData(element);
  location.setMessage(occurrence.message);
  location.setSecondary(occurrence.location);

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

location.setClientData(attribute);
if (mRootAttributes == null) {
  mRootAttributes = new ArrayList<>();

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

location.setClientData(attribute);
if (mRootAttributes == null) {
  mRootAttributes = new ArrayList<Pair<Location,String>>();

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

location.setClientData(attribute);
location.setMessage(occurrence.message);
location.setSecondary(occurrence.location);

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

location.setClientData(attribute);
location.setMessage(occurrence.message);
location.setSecondary(occurrence.location);

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

location.setClientData(element);
location.setSecondary(mMissingLocations.get(name));
mMissingLocations.put(name, location);
location.setClientData(element);
location.setMessage("Also translated here");
location.setSecondary(mExtraLocations.get(name));

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

location.setClientData(element);
location.setSecondary(mMissingLocations.get(name));
mMissingLocations.put(name, location);
location.setClientData(element);
location.setMessage("Also translated here");
location.setSecondary(mExtraLocations.get(name));

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

String description = ClassContext.createSignature(classNode.name,
    method.name, method.desc);
location.setClientData(description);

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

String description = ClassContext.createSignature(classNode.name,
    method.name, method.desc);
location.setClientData(description);

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

location.setClientData(element);
location.setMessage(String.format("Declaration with array size (%1$d)",
        LintUtils.getChildCount(element)));

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

location.setClientData(element);
location.setMessage(String.format("Declaration with array size (%1$d)",
        LintUtils.getChildCount(element)));

相关文章