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
name;
46 private final String
key;
68 ObjectUtilities.equals(other.key,
key) &&
69 ObjectUtilities.equals(other.example,
example);
75 String
name = jsonObject.get(
"name").getAsString();
76 String
key = jsonObject.get(
"key").getAsString();
77 String
example = jsonObject.get(
"example").getAsString();
82 if (jsonArray ==
null) {
85 ArrayList<PostfixTemplateDescriptor> list =
new ArrayList<PostfixTemplateDescriptor>(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(
"name",
name);
126 jsonObject.addProperty(
"key",
key);
127 jsonObject.addProperty(
"example",
example);
133 StringBuilder
builder =
new StringBuilder();
static List< PostfixTemplateDescriptor > fromJsonArray(JsonArray jsonArray)
PostfixTemplateDescriptor(String name, String key, String example)
static PostfixTemplateDescriptor fromJson(JsonObject jsonObject)
boolean equals(Object obj)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For example
DEF_SWITCHES_START aot vmservice shared library name