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")
41 private final String kind;
46 private final String
name;
51 private final String
type;
57 private final String defaultValue;
66 this.defaultValue = defaultValue;
74 ObjectUtilities.
equals(other.kind, kind) &&
75 ObjectUtilities.equals(other.name,
name) &&
76 ObjectUtilities.equals(other.type,
type) &&
77 ObjectUtilities.equals(other.defaultValue, defaultValue);
83 String kind = jsonObject.get(
"kind").getAsString();
84 String
name = jsonObject.get(
"name").getAsString();
85 String
type = jsonObject.get(
"type").getAsString();
86 String defaultValue = jsonObject.get(
"defaultValue") ==
null ? null : jsonObject.get(
"defaultValue").getAsString();
91 if (jsonArray ==
null) {
94 ArrayList<ParameterInfo> list =
new ArrayList<ParameterInfo>(jsonArray.size());
95 Iterator<JsonElement> iterator = jsonArray.iterator();
96 while (iterator.hasNext()) {
97 list.add(fromJson(iterator.next().getAsJsonObject()));
133 HashCodeBuilder
builder =
new HashCodeBuilder();
142 JsonObject jsonObject =
new JsonObject();
143 jsonObject.addProperty(
"kind", kind);
144 jsonObject.addProperty(
"name",
name);
145 jsonObject.addProperty(
"type",
type);
146 if (defaultValue !=
null) {
147 jsonObject.addProperty(
"defaultValue", defaultValue);
154 StringBuilder
builder =
new StringBuilder();
162 builder.append(
"defaultValue=");
boolean equals(Object obj)
ParameterInfo(String kind, String name, String type, String defaultValue)
static ParameterInfo fromJson(JsonObject jsonObject)
static List< ParameterInfo > fromJsonArray(JsonArray jsonArray)
DEF_SWITCHES_START aot vmservice shared library name