Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
org.dartlang.analysis.server.protocol.HoverInformation Class Reference

Public Member Functions

 HoverInformation (int offset, int length, String containingLibraryPath, String containingLibraryName, String containingClassDescription, String dartdoc, String elementDescription, String elementKind, Boolean isDeprecated, String parameter, String propagatedType, String staticType)
 
boolean equals (Object obj)
 
String getContainingClassDescription ()
 
String getContainingLibraryName ()
 
String getContainingLibraryPath ()
 
String getDartdoc ()
 
String getElementDescription ()
 
String getElementKind ()
 
Boolean getIsDeprecated ()
 
int getLength ()
 
int getOffset ()
 
String getParameter ()
 
String getPropagatedType ()
 
String getStaticType ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static HoverInformation fromJson (JsonObject jsonObject)
 
static List< HoverInformationfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final HoverInformation[] EMPTY_ARRAY = new HoverInformation[0]
 
static final List< HoverInformationEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

The hover information associated with a specific location.

@coverage dart.server.generated.types

Definition at line 32 of file HoverInformation.java.

Constructor & Destructor Documentation

◆ HoverInformation()

org.dartlang.analysis.server.protocol.HoverInformation.HoverInformation ( int  offset,
int  length,
String  containingLibraryPath,
String  containingLibraryName,
String  containingClassDescription,
String  dartdoc,
String  elementDescription,
String  elementKind,
Boolean  isDeprecated,
String  parameter,
String  propagatedType,
String  staticType 
)
inline

Constructor for HoverInformation.

Definition at line 116 of file HoverInformation.java.

116 {
117 this.offset = offset;
118 this.length = length;
119 this.containingLibraryPath = containingLibraryPath;
120 this.containingLibraryName = containingLibraryName;
121 this.containingClassDescription = containingClassDescription;
122 this.dartdoc = dartdoc;
123 this.elementDescription = elementDescription;
124 this.elementKind = elementKind;
125 this.isDeprecated = isDeprecated;
126 this.parameter = parameter;
127 this.propagatedType = propagatedType;
128 this.staticType = staticType;
129 }

Member Function Documentation

◆ equals()

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

Definition at line 132 of file HoverInformation.java.

132 {
133 if (obj instanceof HoverInformation) {
134 HoverInformation other = (HoverInformation) obj;
135 return
136 other.offset == offset &&
137 other.length == length &&
138 ObjectUtilities.equals(other.containingLibraryPath, containingLibraryPath) &&
139 ObjectUtilities.equals(other.containingLibraryName, containingLibraryName) &&
140 ObjectUtilities.equals(other.containingClassDescription, containingClassDescription) &&
141 ObjectUtilities.equals(other.dartdoc, dartdoc) &&
142 ObjectUtilities.equals(other.elementDescription, elementDescription) &&
143 ObjectUtilities.equals(other.elementKind, elementKind) &&
144 ObjectUtilities.equals(other.isDeprecated, isDeprecated) &&
145 ObjectUtilities.equals(other.parameter, parameter) &&
146 ObjectUtilities.equals(other.propagatedType, propagatedType) &&
147 ObjectUtilities.equals(other.staticType, staticType);
148 }
149 return false;
150 }

◆ fromJson()

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

Definition at line 152 of file HoverInformation.java.

152 {
153 int offset = jsonObject.get("offset").getAsInt();
154 int length = jsonObject.get("length").getAsInt();
155 String containingLibraryPath = jsonObject.get("containingLibraryPath") == null ? null : jsonObject.get("containingLibraryPath").getAsString();
156 String containingLibraryName = jsonObject.get("containingLibraryName") == null ? null : jsonObject.get("containingLibraryName").getAsString();
157 String containingClassDescription = jsonObject.get("containingClassDescription") == null ? null : jsonObject.get("containingClassDescription").getAsString();
158 String dartdoc = jsonObject.get("dartdoc") == null ? null : jsonObject.get("dartdoc").getAsString();
159 String elementDescription = jsonObject.get("elementDescription") == null ? null : jsonObject.get("elementDescription").getAsString();
160 String elementKind = jsonObject.get("elementKind") == null ? null : jsonObject.get("elementKind").getAsString();
161 Boolean isDeprecated = jsonObject.get("isDeprecated") == null ? null : jsonObject.get("isDeprecated").getAsBoolean();
162 String parameter = jsonObject.get("parameter") == null ? null : jsonObject.get("parameter").getAsString();
163 String propagatedType = jsonObject.get("propagatedType") == null ? null : jsonObject.get("propagatedType").getAsString();
164 String staticType = jsonObject.get("staticType") == null ? null : jsonObject.get("staticType").getAsString();
165 return new HoverInformation(offset, length, containingLibraryPath, containingLibraryName, containingClassDescription, dartdoc, elementDescription, elementKind, isDeprecated, parameter, propagatedType, staticType);
166 }
HoverInformation(int offset, int length, String containingLibraryPath, String containingLibraryName, String containingClassDescription, String dartdoc, String elementDescription, String elementKind, Boolean isDeprecated, String parameter, String propagatedType, String staticType)

◆ fromJsonArray()

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

Definition at line 168 of file HoverInformation.java.

168 {
169 if (jsonArray == null) {
170 return EMPTY_LIST;
171 }
172 ArrayList<HoverInformation> list = new ArrayList<HoverInformation>(jsonArray.size());
173 Iterator<JsonElement> iterator = jsonArray.iterator();
174 while (iterator.hasNext()) {
175 list.add(fromJson(iterator.next().getAsJsonObject()));
176 }
177 return list;
178 }
static HoverInformation fromJson(JsonObject jsonObject)

◆ getContainingClassDescription()

String org.dartlang.analysis.server.protocol.HoverInformation.getContainingClassDescription ( )
inline

A human-readable description of the class declaring the element being referenced. This data is omitted if there is no referenced element, or if the element is not a class member.

Definition at line 184 of file HoverInformation.java.

184 {
185 return containingClassDescription;
186 }

◆ getContainingLibraryName()

String org.dartlang.analysis.server.protocol.HoverInformation.getContainingLibraryName ( )
inline

The URI of the containing library, examples here include "dart:core", "package:.." and file uris represented by the path on disk, "/..". The data is omitted if the element is declared inside an HTML file.

Definition at line 193 of file HoverInformation.java.

193 {
194 return containingLibraryName;
195 }

◆ getContainingLibraryPath()

String org.dartlang.analysis.server.protocol.HoverInformation.getContainingLibraryPath ( )
inline

The path to the defining compilation unit of the library in which the referenced element is declared. This data is omitted if there is no referenced element, or if the element is declared inside an HTML file.

Definition at line 202 of file HoverInformation.java.

202 {
203 return containingLibraryPath;
204 }

◆ getDartdoc()

String org.dartlang.analysis.server.protocol.HoverInformation.getDartdoc ( )
inline

The dartdoc associated with the referenced element. Other than the removal of the comment delimiters, including leading asterisks in the case of a block comment, the dartdoc is unprocessed markdown. This data is omitted if there is no referenced element, or if the element has no dartdoc.

Definition at line 212 of file HoverInformation.java.

212 {
213 return dartdoc;
214 }

◆ getElementDescription()

String org.dartlang.analysis.server.protocol.HoverInformation.getElementDescription ( )
inline

A human-readable description of the element being referenced. This data is omitted if there is no referenced element.

Definition at line 220 of file HoverInformation.java.

220 {
221 return elementDescription;
222 }

◆ getElementKind()

String org.dartlang.analysis.server.protocol.HoverInformation.getElementKind ( )
inline

A human-readable description of the kind of element being referenced (such as "class" or "function type alias"). This data is omitted if there is no referenced element.

Definition at line 228 of file HoverInformation.java.

228 {
229 return elementKind;
230 }

◆ getIsDeprecated()

Boolean org.dartlang.analysis.server.protocol.HoverInformation.getIsDeprecated ( )
inline

True if the referenced element is deprecated.

Definition at line 235 of file HoverInformation.java.

235 {
236 return isDeprecated;
237 }

◆ getLength()

int org.dartlang.analysis.server.protocol.HoverInformation.getLength ( )
inline

The length of the range of characters that encompasses the cursor position and has the same hover information as the cursor position.

Definition at line 243 of file HoverInformation.java.

243 {
244 return length;
245 }

◆ getOffset()

int org.dartlang.analysis.server.protocol.HoverInformation.getOffset ( )
inline

The offset of the range of characters that encompasses the cursor position and has the same hover information as the cursor position.

Definition at line 251 of file HoverInformation.java.

251 {
252 return offset;
253 }

◆ getParameter()

String org.dartlang.analysis.server.protocol.HoverInformation.getParameter ( )
inline

A human-readable description of the parameter corresponding to the expression being hovered over. This data is omitted if the location is not in an argument to a function.

Definition at line 259 of file HoverInformation.java.

259 {
260 return parameter;
261 }

◆ getPropagatedType()

String org.dartlang.analysis.server.protocol.HoverInformation.getPropagatedType ( )
inline

The name of the propagated type of the expression. This data is omitted if the location does not correspond to an expression or if there is no propagated type information.

Definition at line 267 of file HoverInformation.java.

267 {
268 return propagatedType;
269 }

◆ getStaticType()

String org.dartlang.analysis.server.protocol.HoverInformation.getStaticType ( )
inline

The name of the static type of the expression. This data is omitted if the location does not correspond to an expression.

Definition at line 275 of file HoverInformation.java.

275 {
276 return staticType;
277 }

◆ hashCode()

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

Definition at line 280 of file HoverInformation.java.

280 {
281 HashCodeBuilder builder = new HashCodeBuilder();
282 builder.append(offset);
283 builder.append(length);
284 builder.append(containingLibraryPath);
285 builder.append(containingLibraryName);
286 builder.append(containingClassDescription);
287 builder.append(dartdoc);
288 builder.append(elementDescription);
289 builder.append(elementKind);
290 builder.append(isDeprecated);
291 builder.append(parameter);
292 builder.append(propagatedType);
293 builder.append(staticType);
294 return builder.toHashCode();
295 }

◆ toJson()

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

Definition at line 297 of file HoverInformation.java.

297 {
298 JsonObject jsonObject = new JsonObject();
299 jsonObject.addProperty("offset", offset);
300 jsonObject.addProperty("length", length);
301 if (containingLibraryPath != null) {
302 jsonObject.addProperty("containingLibraryPath", containingLibraryPath);
303 }
304 if (containingLibraryName != null) {
305 jsonObject.addProperty("containingLibraryName", containingLibraryName);
306 }
307 if (containingClassDescription != null) {
308 jsonObject.addProperty("containingClassDescription", containingClassDescription);
309 }
310 if (dartdoc != null) {
311 jsonObject.addProperty("dartdoc", dartdoc);
312 }
313 if (elementDescription != null) {
314 jsonObject.addProperty("elementDescription", elementDescription);
315 }
316 if (elementKind != null) {
317 jsonObject.addProperty("elementKind", elementKind);
318 }
319 if (isDeprecated != null) {
320 jsonObject.addProperty("isDeprecated", isDeprecated);
321 }
322 if (parameter != null) {
323 jsonObject.addProperty("parameter", parameter);
324 }
325 if (propagatedType != null) {
326 jsonObject.addProperty("propagatedType", propagatedType);
327 }
328 if (staticType != null) {
329 jsonObject.addProperty("staticType", staticType);
330 }
331 return jsonObject;
332 }

◆ toString()

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

Definition at line 335 of file HoverInformation.java.

335 {
336 StringBuilder builder = new StringBuilder();
337 builder.append("[");
338 builder.append("offset=");
339 builder.append(offset + ", ");
340 builder.append("length=");
341 builder.append(length + ", ");
342 builder.append("containingLibraryPath=");
343 builder.append(containingLibraryPath + ", ");
344 builder.append("containingLibraryName=");
345 builder.append(containingLibraryName + ", ");
346 builder.append("containingClassDescription=");
347 builder.append(containingClassDescription + ", ");
348 builder.append("dartdoc=");
349 builder.append(dartdoc + ", ");
350 builder.append("elementDescription=");
351 builder.append(elementDescription + ", ");
352 builder.append("elementKind=");
353 builder.append(elementKind + ", ");
354 builder.append("isDeprecated=");
355 builder.append(isDeprecated + ", ");
356 builder.append("parameter=");
357 builder.append(parameter + ", ");
358 builder.append("propagatedType=");
359 builder.append(propagatedType + ", ");
360 builder.append("staticType=");
361 builder.append(staticType);
362 builder.append("]");
363 return builder.toString();
364 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file HoverInformation.java.

◆ EMPTY_LIST

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

Definition at line 36 of file HoverInformation.java.


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