Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
org.dartlang.analysis.server.protocol.ContextData Class Reference

Public Member Functions

 ContextData (String name, int explicitFileCount, int implicitFileCount, int workItemQueueLength, List< String > cacheEntryExceptions)
 
boolean equals (Object obj)
 
List< String > getCacheEntryExceptions ()
 
int getExplicitFileCount ()
 
int getImplicitFileCount ()
 
String getName ()
 
int getWorkItemQueueLength ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static ContextData fromJson (JsonObject jsonObject)
 
static List< ContextDatafromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final ContextData[] EMPTY_ARRAY = new ContextData[0]
 
static final List< ContextDataEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

Information about an analysis context.

@coverage dart.server.generated.types

Definition at line 32 of file ContextData.java.

Constructor & Destructor Documentation

◆ ContextData()

org.dartlang.analysis.server.protocol.ContextData.ContextData ( String  name,
int  explicitFileCount,
int  implicitFileCount,
int  workItemQueueLength,
List< String >  cacheEntryExceptions 
)
inline

Constructor for ContextData.

Definition at line 66 of file ContextData.java.

66 {
67 this.name = name;
68 this.explicitFileCount = explicitFileCount;
69 this.implicitFileCount = implicitFileCount;
70 this.workItemQueueLength = workItemQueueLength;
71 this.cacheEntryExceptions = cacheEntryExceptions;
72 }

Member Function Documentation

◆ equals()

boolean org.dartlang.analysis.server.protocol.ContextData.equals ( Object  obj)
inline

Definition at line 75 of file ContextData.java.

75 {
76 if (obj instanceof ContextData) {
77 ContextData other = (ContextData) obj;
78 return
79 ObjectUtilities.equals(other.name, name) &&
80 other.explicitFileCount == explicitFileCount &&
81 other.implicitFileCount == implicitFileCount &&
82 other.workItemQueueLength == workItemQueueLength &&
83 ObjectUtilities.equals(other.cacheEntryExceptions, cacheEntryExceptions);
84 }
85 return false;
86 }
ContextData(String name, int explicitFileCount, int implicitFileCount, int workItemQueueLength, List< String > cacheEntryExceptions)

◆ fromJson()

static ContextData org.dartlang.analysis.server.protocol.ContextData.fromJson ( JsonObject  jsonObject)
inlinestatic

Definition at line 88 of file ContextData.java.

88 {
89 String name = jsonObject.get("name").getAsString();
90 int explicitFileCount = jsonObject.get("explicitFileCount").getAsInt();
91 int implicitFileCount = jsonObject.get("implicitFileCount").getAsInt();
92 int workItemQueueLength = jsonObject.get("workItemQueueLength").getAsInt();
93 List<String> cacheEntryExceptions = JsonUtilities.decodeStringList(jsonObject.get("cacheEntryExceptions").getAsJsonArray());
94 return new ContextData(name, explicitFileCount, implicitFileCount, workItemQueueLength, cacheEntryExceptions);
95 }

◆ fromJsonArray()

static List< ContextData > org.dartlang.analysis.server.protocol.ContextData.fromJsonArray ( JsonArray  jsonArray)
inlinestatic

Definition at line 97 of file ContextData.java.

97 {
98 if (jsonArray == null) {
99 return EMPTY_LIST;
100 }
101 ArrayList<ContextData> list = new ArrayList<ContextData>(jsonArray.size());
102 Iterator<JsonElement> iterator = jsonArray.iterator();
103 while (iterator.hasNext()) {
104 list.add(fromJson(iterator.next().getAsJsonObject()));
105 }
106 return list;
107 }
static final List< ContextData > EMPTY_LIST
static ContextData fromJson(JsonObject jsonObject)

◆ getCacheEntryExceptions()

List< String > org.dartlang.analysis.server.protocol.ContextData.getCacheEntryExceptions ( )
inline

Exceptions associated with cache entries.

Definition at line 112 of file ContextData.java.

112 {
113 return cacheEntryExceptions;
114 }

◆ getExplicitFileCount()

int org.dartlang.analysis.server.protocol.ContextData.getExplicitFileCount ( )
inline

Explicitly analyzed files.

Definition at line 119 of file ContextData.java.

119 {
120 return explicitFileCount;
121 }

◆ getImplicitFileCount()

int org.dartlang.analysis.server.protocol.ContextData.getImplicitFileCount ( )
inline

Implicitly analyzed files.

Definition at line 126 of file ContextData.java.

126 {
127 return implicitFileCount;
128 }

◆ getName()

String org.dartlang.analysis.server.protocol.ContextData.getName ( )
inline

The name of the context.

Definition at line 133 of file ContextData.java.

133 {
134 return name;
135 }

◆ getWorkItemQueueLength()

int org.dartlang.analysis.server.protocol.ContextData.getWorkItemQueueLength ( )
inline

The number of work items in the queue.

Definition at line 140 of file ContextData.java.

140 {
141 return workItemQueueLength;
142 }

◆ hashCode()

int org.dartlang.analysis.server.protocol.ContextData.hashCode ( )
inline

Definition at line 145 of file ContextData.java.

145 {
146 HashCodeBuilder builder = new HashCodeBuilder();
147 builder.append(name);
148 builder.append(explicitFileCount);
149 builder.append(implicitFileCount);
150 builder.append(workItemQueueLength);
151 builder.append(cacheEntryExceptions);
152 return builder.toHashCode();
153 }

◆ toJson()

JsonObject org.dartlang.analysis.server.protocol.ContextData.toJson ( )
inline

Definition at line 155 of file ContextData.java.

155 {
156 JsonObject jsonObject = new JsonObject();
157 jsonObject.addProperty("name", name);
158 jsonObject.addProperty("explicitFileCount", explicitFileCount);
159 jsonObject.addProperty("implicitFileCount", implicitFileCount);
160 jsonObject.addProperty("workItemQueueLength", workItemQueueLength);
161 JsonArray jsonArrayCacheEntryExceptions = new JsonArray();
162 for (String elt : cacheEntryExceptions) {
163 jsonArrayCacheEntryExceptions.add(new JsonPrimitive(elt));
164 }
165 jsonObject.add("cacheEntryExceptions", jsonArrayCacheEntryExceptions);
166 return jsonObject;
167 }

◆ toString()

String org.dartlang.analysis.server.protocol.ContextData.toString ( )
inline

Definition at line 170 of file ContextData.java.

170 {
171 StringBuilder builder = new StringBuilder();
172 builder.append("[");
173 builder.append("name=");
174 builder.append(name + ", ");
175 builder.append("explicitFileCount=");
176 builder.append(explicitFileCount + ", ");
177 builder.append("implicitFileCount=");
178 builder.append(implicitFileCount + ", ");
179 builder.append("workItemQueueLength=");
180 builder.append(workItemQueueLength + ", ");
181 builder.append("cacheEntryExceptions=");
182 builder.append(StringUtils.join(cacheEntryExceptions, ", "));
183 builder.append("]");
184 return builder.toString();
185 }

Member Data Documentation

◆ EMPTY_ARRAY

final ContextData [] org.dartlang.analysis.server.protocol.ContextData.EMPTY_ARRAY = new ContextData[0]
static

Definition at line 34 of file ContextData.java.

◆ EMPTY_LIST

final List<ContextData> org.dartlang.analysis.server.protocol.ContextData.EMPTY_LIST = Lists.newArrayList()
static

Definition at line 36 of file ContextData.java.


The documentation for this class was generated from the following file: