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;
31@SuppressWarnings(
"unused")
46 private final String kind;
53 private final boolean isPotential;
65 this.location = location;
67 this.isPotential = isPotential;
76 ObjectUtilities.
equals(other.location, location) &&
77 ObjectUtilities.equals(other.kind, kind) &&
78 other.isPotential == isPotential &&
79 ObjectUtilities.equals(other.path,
path);
86 String kind = jsonObject.get(
"kind").getAsString();
87 boolean isPotential = jsonObject.get(
"isPotential").getAsBoolean();
93 if (jsonArray ==
null) {
96 ArrayList<SearchResult> list =
new ArrayList<SearchResult>(jsonArray.size());
97 Iterator<JsonElement> iterator = jsonArray.iterator();
98 while (iterator.hasNext()) {
99 list.add(fromJson(iterator.next().getAsJsonObject()));
137 HashCodeBuilder
builder =
new HashCodeBuilder();
146 JsonObject jsonObject =
new JsonObject();
147 jsonObject.add(
"location", location.
toJson());
148 jsonObject.addProperty(
"kind", kind);
149 jsonObject.addProperty(
"isPotential", isPotential);
150 JsonArray jsonArrayPath =
new JsonArray();
152 jsonArrayPath.add(elt.toJson());
154 jsonObject.add(
"path", jsonArrayPath);
160 StringBuilder
builder =
new StringBuilder();
163 builder.append(location +
", ");
166 builder.append(
"isPotential=");
167 builder.append(isPotential +
", ");
static List< Element > fromJsonArray(JsonArray jsonArray)
static Location fromJson(JsonObject jsonObject)
List< Element > getPath()
static List< SearchResult > fromJsonArray(JsonArray jsonArray)
SearchResult(Location location, String kind, boolean isPotential, List< Element > path)
static SearchResult fromJson(JsonObject jsonObject)
boolean equals(Object obj)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path