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 int time;
46 private final String kind;
51 private final String
data;
68 ObjectUtilities.equals(other.kind, kind) &&
69 ObjectUtilities.equals(other.data,
data);
75 int time = jsonObject.get(
"time").getAsInt();
76 String kind = jsonObject.get(
"kind").getAsString();
77 String
data = jsonObject.get(
"data").getAsString();
82 if (jsonArray ==
null) {
85 ArrayList<ServerLogEntry> list =
new ArrayList<ServerLogEntry>(jsonArray.size());
86 Iterator<JsonElement> iterator = jsonArray.iterator();
87 while (iterator.hasNext()) {
88 list.add(fromJson(iterator.next().getAsJsonObject()));
116 HashCodeBuilder
builder =
new HashCodeBuilder();
124 JsonObject jsonObject =
new JsonObject();
125 jsonObject.addProperty(
"time",
time);
126 jsonObject.addProperty(
"kind", kind);
127 jsonObject.addProperty(
"data",
data);
133 StringBuilder
builder =
new StringBuilder();
boolean equals(Object obj)
ServerLogEntry(int time, String kind, String data)
static List< ServerLogEntry > fromJsonArray(JsonArray jsonArray)
static ServerLogEntry fromJson(JsonObject jsonObject)
static double time(int loops, Benchmark *bench, Target *target)
std::shared_ptr< const fml::Mapping > data