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;
33@SuppressWarnings(
"unused")
72 ObjectUtilities.equals(other.type,
type);
78 int offset = jsonObject.get(
"offset").getAsInt();
79 int length = jsonObject.get(
"length").getAsInt();
85 if (jsonArray ==
null) {
88 ArrayList<RuntimeCompletionExpression> list =
new ArrayList<RuntimeCompletionExpression>(jsonArray.size());
89 Iterator<JsonElement> iterator = jsonArray.iterator();
90 while (iterator.hasNext()) {
91 list.add(fromJson(iterator.next().getAsJsonObject()));
120 HashCodeBuilder
builder =
new HashCodeBuilder();
128 JsonObject jsonObject =
new JsonObject();
129 jsonObject.addProperty(
"offset",
offset);
130 jsonObject.addProperty(
"length",
length);
132 jsonObject.add(
"type",
type.toJson());
139 StringBuilder
builder =
new StringBuilder();
static RuntimeCompletionExpressionType fromJson(JsonObject jsonObject)
RuntimeCompletionExpression(int offset, int length, RuntimeCompletionExpressionType type)
boolean equals(Object obj)
static RuntimeCompletionExpression fromJson(JsonObject jsonObject)
RuntimeCompletionExpressionType getType()
static List< RuntimeCompletionExpression > fromJsonArray(JsonArray jsonArray)