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;
34@SuppressWarnings(
"unused")
57 this.location = location;
66 ObjectUtilities.equals(other.location, location);
72 String
message = jsonObject.get(
"message").getAsString();
78 if (jsonArray ==
null) {
81 ArrayList<DiagnosticMessage> list =
new ArrayList<DiagnosticMessage>(jsonArray.size());
82 Iterator<JsonElement> iterator = jsonArray.iterator();
83 while (iterator.hasNext()) {
84 list.add(fromJson(iterator.next().getAsJsonObject()));
106 HashCodeBuilder
builder =
new HashCodeBuilder();
113 JsonObject jsonObject =
new JsonObject();
114 jsonObject.addProperty(
"message",
message);
115 jsonObject.add(
"location", location.
toJson());
121 StringBuilder
builder =
new StringBuilder();
static List< DiagnosticMessage > fromJsonArray(JsonArray jsonArray)
static DiagnosticMessage fromJson(JsonObject jsonObject)
boolean equals(Object obj)
DiagnosticMessage(String message, Location location)
static Location fromJson(JsonObject jsonObject)