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")
42 private final String libraryUri;
47 private final String className;
52 private final String
name;
58 private final String documentation;
64 this.libraryUri = libraryUri;
65 this.className = className;
67 this.documentation = documentation;
75 ObjectUtilities.
equals(other.libraryUri, libraryUri) &&
76 ObjectUtilities.equals(other.className, className) &&
77 ObjectUtilities.equals(other.name,
name) &&
78 ObjectUtilities.equals(other.documentation, documentation);
84 String libraryUri = jsonObject.get(
"libraryUri").getAsString();
85 String className = jsonObject.get(
"className").getAsString();
86 String
name = jsonObject.get(
"name").getAsString();
87 String documentation = jsonObject.get(
"documentation") ==
null ? null : jsonObject.get(
"documentation").getAsString();
92 if (jsonArray ==
null) {
95 ArrayList<FlutterWidgetPropertyValueEnumItem> list =
new ArrayList<FlutterWidgetPropertyValueEnumItem>(jsonArray.size());
96 Iterator<JsonElement> iterator = jsonArray.iterator();
97 while (iterator.hasNext()) {
98 list.add(fromJson(iterator.next().getAsJsonObject()));
115 return documentation;
135 HashCodeBuilder
builder =
new HashCodeBuilder();
144 JsonObject jsonObject =
new JsonObject();
145 jsonObject.addProperty(
"libraryUri", libraryUri);
146 jsonObject.addProperty(
"className", className);
147 jsonObject.addProperty(
"name",
name);
148 if (documentation !=
null) {
149 jsonObject.addProperty(
"documentation", documentation);
156 StringBuilder
builder =
new StringBuilder();
159 builder.append(libraryUri +
", ");
161 builder.append(className +
", ");
164 builder.append(
"documentation=");
DEF_SWITCHES_START aot vmservice shared library name