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")
38 private final String kind;
47 this.enumItems = enumItems;
55 ObjectUtilities.
equals(other.kind, kind) &&
56 ObjectUtilities.equals(other.enumItems, enumItems);
62 String kind = jsonObject.get(
"kind").getAsString();
68 if (jsonArray ==
null) {
71 ArrayList<FlutterWidgetPropertyEditor> list =
new ArrayList<FlutterWidgetPropertyEditor>(jsonArray.size());
72 Iterator<JsonElement> iterator = jsonArray.iterator();
73 while (iterator.hasNext()) {
74 list.add(fromJson(iterator.next().getAsJsonObject()));
89 HashCodeBuilder
builder =
new HashCodeBuilder();
96 JsonObject jsonObject =
new JsonObject();
97 jsonObject.addProperty(
"kind", kind);
98 if (enumItems !=
null) {
99 JsonArray jsonArrayEnumItems =
new JsonArray();
101 jsonArrayEnumItems.add(elt.toJson());
103 jsonObject.add(
"enumItems", jsonArrayEnumItems);
110 StringBuilder
builder =
new StringBuilder();
115 builder.append(StringUtils.join(enumItems,
", "));