9package org.dartlang.analysis.server.protocol;
11import java.util.Arrays;
14import com.google.common.collect.Lists;
15import com.google.dart.server.utilities.general.JsonUtilities;
16import com.google.dart.server.utilities.general.ObjectUtilities;
17import com.google.gson.JsonArray;
18import com.google.gson.JsonElement;
19import com.google.gson.JsonObject;
20import com.google.gson.JsonPrimitive;
21import org.apache.commons.lang3.builder.HashCodeBuilder;
22import java.util.ArrayList;
23import java.util.Iterator;
24import org.apache.commons.lang3.StringUtils;
29@SuppressWarnings(
"unused")
39 private final String
name;
44 private final int occurrences;
51 this.occurrences = occurrences;
60 other.occurrences == occurrences;
66 String
name = jsonObject.get(
"name").getAsString();
67 int occurrences = jsonObject.get(
"occurrences").getAsInt();
72 if (jsonArray ==
null) {
75 ArrayList<InlineLocalVariableFeedback> list =
new ArrayList<InlineLocalVariableFeedback>(jsonArray.size());
76 Iterator<JsonElement> iterator = jsonArray.iterator();
77 while (iterator.hasNext()) {
78 list.add(fromJson(iterator.next().getAsJsonObject()));
99 HashCodeBuilder
builder =
new HashCodeBuilder();
106 JsonObject jsonObject =
new JsonObject();
107 jsonObject.addProperty(
"name",
name);
108 jsonObject.addProperty(
"occurrences", occurrences);
114 StringBuilder
builder =
new StringBuilder();
118 builder.append(
"occurrences=");
boolean equals(Object obj)
static List< InlineLocalVariableFeedback > fromJsonArray(JsonArray jsonArray)
static InlineLocalVariableFeedback fromJson(JsonObject jsonObject)
InlineLocalVariableFeedback(String name, int occurrences)
DEF_SWITCHES_START aot vmservice shared library name