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 boolean isListingPackageDirs;
47 this.isListingPackageDirs = isListingPackageDirs;
55 other.isListingPackageDirs == isListingPackageDirs;
61 boolean isListingPackageDirs = jsonObject.get(
"isListingPackageDirs").getAsBoolean();
62 return new PubStatus(isListingPackageDirs);
66 if (jsonArray ==
null) {
69 ArrayList<PubStatus> list =
new ArrayList<PubStatus>(jsonArray.size());
70 Iterator<JsonElement> iterator = jsonArray.iterator();
71 while (iterator.hasNext()) {
72 list.add(fromJson(iterator.next().getAsJsonObject()));
81 return isListingPackageDirs;
86 HashCodeBuilder
builder =
new HashCodeBuilder();
87 builder.append(isListingPackageDirs);
92 JsonObject jsonObject =
new JsonObject();
93 jsonObject.addProperty(
"isListingPackageDirs", isListingPackageDirs);
99 StringBuilder
builder =
new StringBuilder();
101 builder.append(
"isListingPackageDirs=");
102 builder.append(isListingPackageDirs);
PubStatus(boolean isListingPackageDirs)
static List< PubStatus > fromJsonArray(JsonArray jsonArray)
static PubStatus fromJson(JsonObject jsonObject)
boolean equals(Object obj)
boolean isListingPackageDirs()