Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
CompletionSuggestion.java
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
3 * for details. All rights reserved. Use of this source code is governed by a
4 * BSD-style license that can be found in the LICENSE file.
5 *
6 * This file has been automatically generated. Please do not edit it manually.
7 * To regenerate the file, use the script "pkg/analysis_server/tool/spec/generate_files".
8 */
9package org.dartlang.analysis.server.protocol;
10
11import java.util.Arrays;
12import java.util.List;
13import java.util.Map;
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;
25
26/**
27 * A suggestion for how to complete partially entered text. Many of the fields are optional,
28 * depending on the kind of element being suggested.
29 *
30 * @coverage dart.server.generated.types
31 */
32@SuppressWarnings("unused")
34
35 public static final CompletionSuggestion[] EMPTY_ARRAY = new CompletionSuggestion[0];
36
37 public static final List<CompletionSuggestion> EMPTY_LIST = Lists.newArrayList();
38
39 /**
40 * The kind of element being suggested.
41 */
42 private final String kind;
43
44 /**
45 * The relevance of this completion suggestion where a higher number indicates a higher relevance.
46 */
47 private final int relevance;
48
49 /**
50 * The identifier to be inserted if the suggestion is selected. If the suggestion is for a method
51 * or function, the client might want to additionally insert a template for the parameters. The
52 * information required in order to do so is contained in other fields.
53 */
54 private final String completion;
55
56 /**
57 * Text to be displayed in, for example, a completion pop-up. This field is only defined if the
58 * displayed text should be different than the completion. Otherwise it is omitted.
59 */
60 private final String displayText;
61
62 /**
63 * The offset of the start of the text to be replaced. If supplied, this should be used in
64 * preference to the offset provided on the containing completion results. This value may be
65 * provided independently of replacementLength (for example if only one differs from the completion
66 * result value).
67 */
68 private final Integer replacementOffset;
69
70 /**
71 * The length of the text to be replaced. If supplied, this should be used in preference to the
72 * offset provided on the containing completion results. This value may be provided independently
73 * of replacementOffset (for example if only one differs from the completion result value).
74 */
75 private final Integer replacementLength;
76
77 /**
78 * The offset, relative to the beginning of the completion, of where the selection should be placed
79 * after insertion.
80 */
81 private final int selectionOffset;
82
83 /**
84 * The number of characters that should be selected after insertion.
85 */
86 private final int selectionLength;
87
88 /**
89 * True if the suggested element is deprecated.
90 */
91 private final boolean isDeprecated;
92
93 /**
94 * True if the element is not known to be valid for the target. This happens if the type of the
95 * target is dynamic.
96 */
97 private final boolean isPotential;
98
99 /**
100 * An abbreviated version of the Dartdoc associated with the element being suggested. This field is
101 * omitted if there is no Dartdoc associated with the element.
102 */
103 private final String docSummary;
104
105 /**
106 * The Dartdoc associated with the element being suggested. This field is omitted if there is no
107 * Dartdoc associated with the element.
108 */
109 private final String docComplete;
110
111 /**
112 * The class that declares the element being suggested. This field is omitted if the suggested
113 * element is not a member of a class.
114 */
115 private final String declaringType;
116
117 /**
118 * A default String for use in generating argument list source contents on the client side.
119 */
120 private final String defaultArgumentListString;
121
122 /**
123 * Pairs of offsets and lengths describing 'defaultArgumentListString' text ranges suitable for use
124 * by clients to set up linked edits of default argument source contents. For example, given an
125 * argument list string 'x, y', the corresponding text range [0, 1, 3, 1], indicates two text
126 * ranges of length 1, starting at offsets 0 and 3. Clients can use these ranges to treat the 'x'
127 * and 'y' values specially for linked edits.
128 */
129 private final int[] defaultArgumentListTextRanges;
130
131 /**
132 * Information about the element reference being suggested.
133 */
134 private final Element element;
135
136 /**
137 * The return type of the getter, function or method or the type of the field being suggested. This
138 * field is omitted if the suggested element is not a getter, function or method.
139 */
140 private final String returnType;
141
142 /**
143 * The names of the parameters of the function or method being suggested. This field is omitted if
144 * the suggested element is not a setter, function or method.
145 */
146 private final List<String> parameterNames;
147
148 /**
149 * The types of the parameters of the function or method being suggested. This field is omitted if
150 * the parameterNames field is omitted.
151 */
152 private final List<String> parameterTypes;
153
154 /**
155 * The number of required parameters for the function or method being suggested. This field is
156 * omitted if the parameterNames field is omitted.
157 */
158 private final Integer requiredParameterCount;
159
160 /**
161 * True if the function or method being suggested has at least one named parameter. This field is
162 * omitted if the parameterNames field is omitted.
163 */
164 private final Boolean hasNamedParameters;
165
166 /**
167 * The name of the optional parameter being suggested. This field is omitted if the suggestion is
168 * not the addition of an optional argument within an argument list.
169 */
170 private final String parameterName;
171
172 /**
173 * The type of the options parameter being suggested. This field is omitted if the parameterName
174 * field is omitted.
175 */
176 private final String parameterType;
177
178 /**
179 * This field is omitted if getSuggestions was used rather than getSuggestions2.
180 *
181 * This field is omitted if this suggestion corresponds to a locally declared element.
182 *
183 * If this suggestion corresponds to an already imported element, then this field is the URI of a
184 * library that provides this element, not the URI of the library where the element is declared.
185 *
186 * If this suggestion corresponds to an element from a not yet imported library, this field is the
187 * URI of a library that could be imported to make this suggestion accessible in the file where
188 * completion was requested, such as package:foo/bar.dart or
189 * file:///home/me/workspace/foo/test/bar_test.dart.
190 */
191 private final String libraryUri;
192
193 /**
194 * True if the suggestion is for an element from a not yet imported library. This field is omitted
195 * if the element is declared locally, or is from library is already imported, so that the
196 * suggestion can be inserted as is, or if getSuggestions was used rather than getSuggestions2.
197 */
198 private final Boolean isNotImported;
199
200 /**
201 * Constructor for {@link CompletionSuggestion}.
202 */
203 public CompletionSuggestion(String kind, int relevance, String completion, String displayText, Integer replacementOffset, Integer replacementLength, int selectionOffset, int selectionLength, boolean isDeprecated, boolean isPotential, String docSummary, String docComplete, String declaringType, String defaultArgumentListString, int[] defaultArgumentListTextRanges, Element element, String returnType, List<String> parameterNames, List<String> parameterTypes, Integer requiredParameterCount, Boolean hasNamedParameters, String parameterName, String parameterType, String libraryUri, Boolean isNotImported) {
204 this.kind = kind;
205 this.relevance = relevance;
206 this.completion = completion;
207 this.displayText = displayText;
208 this.replacementOffset = replacementOffset;
209 this.replacementLength = replacementLength;
210 this.selectionOffset = selectionOffset;
211 this.selectionLength = selectionLength;
212 this.isDeprecated = isDeprecated;
213 this.isPotential = isPotential;
214 this.docSummary = docSummary;
215 this.docComplete = docComplete;
216 this.declaringType = declaringType;
217 this.defaultArgumentListString = defaultArgumentListString;
218 this.defaultArgumentListTextRanges = defaultArgumentListTextRanges;
219 this.element = element;
220 this.returnType = returnType;
221 this.parameterNames = parameterNames;
222 this.parameterTypes = parameterTypes;
223 this.requiredParameterCount = requiredParameterCount;
224 this.hasNamedParameters = hasNamedParameters;
225 this.parameterName = parameterName;
226 this.parameterType = parameterType;
227 this.libraryUri = libraryUri;
228 this.isNotImported = isNotImported;
229 }
230
231 @Override
232 public boolean equals(Object obj) {
233 if (obj instanceof CompletionSuggestion) {
235 return
236 ObjectUtilities.equals(other.kind, kind) &&
237 other.relevance == relevance &&
238 ObjectUtilities.equals(other.completion, completion) &&
239 ObjectUtilities.equals(other.displayText, displayText) &&
240 ObjectUtilities.equals(other.replacementOffset, replacementOffset) &&
241 ObjectUtilities.equals(other.replacementLength, replacementLength) &&
242 other.selectionOffset == selectionOffset &&
243 other.selectionLength == selectionLength &&
244 other.isDeprecated == isDeprecated &&
245 other.isPotential == isPotential &&
246 ObjectUtilities.equals(other.docSummary, docSummary) &&
247 ObjectUtilities.equals(other.docComplete, docComplete) &&
248 ObjectUtilities.equals(other.declaringType, declaringType) &&
249 ObjectUtilities.equals(other.defaultArgumentListString, defaultArgumentListString) &&
250 Arrays.equals(other.defaultArgumentListTextRanges, defaultArgumentListTextRanges) &&
251 ObjectUtilities.equals(other.element, element) &&
252 ObjectUtilities.equals(other.returnType, returnType) &&
253 ObjectUtilities.equals(other.parameterNames, parameterNames) &&
254 ObjectUtilities.equals(other.parameterTypes, parameterTypes) &&
255 ObjectUtilities.equals(other.requiredParameterCount, requiredParameterCount) &&
256 ObjectUtilities.equals(other.hasNamedParameters, hasNamedParameters) &&
257 ObjectUtilities.equals(other.parameterName, parameterName) &&
258 ObjectUtilities.equals(other.parameterType, parameterType) &&
259 ObjectUtilities.equals(other.libraryUri, libraryUri) &&
260 ObjectUtilities.equals(other.isNotImported, isNotImported);
261 }
262 return false;
263 }
264
265 public static CompletionSuggestion fromJson(JsonObject jsonObject) {
266 String kind = jsonObject.get("kind").getAsString();
267 int relevance = jsonObject.get("relevance").getAsInt();
268 String completion = jsonObject.get("completion").getAsString();
269 String displayText = jsonObject.get("displayText") == null ? null : jsonObject.get("displayText").getAsString();
270 Integer replacementOffset = jsonObject.get("replacementOffset") == null ? null : jsonObject.get("replacementOffset").getAsInt();
271 Integer replacementLength = jsonObject.get("replacementLength") == null ? null : jsonObject.get("replacementLength").getAsInt();
272 int selectionOffset = jsonObject.get("selectionOffset").getAsInt();
273 int selectionLength = jsonObject.get("selectionLength").getAsInt();
274 boolean isDeprecated = jsonObject.get("isDeprecated").getAsBoolean();
275 boolean isPotential = jsonObject.get("isPotential").getAsBoolean();
276 String docSummary = jsonObject.get("docSummary") == null ? null : jsonObject.get("docSummary").getAsString();
277 String docComplete = jsonObject.get("docComplete") == null ? null : jsonObject.get("docComplete").getAsString();
278 String declaringType = jsonObject.get("declaringType") == null ? null : jsonObject.get("declaringType").getAsString();
279 String defaultArgumentListString = jsonObject.get("defaultArgumentListString") == null ? null : jsonObject.get("defaultArgumentListString").getAsString();
280 int[] defaultArgumentListTextRanges = jsonObject.get("defaultArgumentListTextRanges") == null ? null : JsonUtilities.decodeIntArray(jsonObject.get("defaultArgumentListTextRanges").getAsJsonArray());
281 Element element = jsonObject.get("element") == null ? null : Element.fromJson(jsonObject.get("element").getAsJsonObject());
282 String returnType = jsonObject.get("returnType") == null ? null : jsonObject.get("returnType").getAsString();
283 List<String> parameterNames = jsonObject.get("parameterNames") == null ? null : JsonUtilities.decodeStringList(jsonObject.get("parameterNames").getAsJsonArray());
284 List<String> parameterTypes = jsonObject.get("parameterTypes") == null ? null : JsonUtilities.decodeStringList(jsonObject.get("parameterTypes").getAsJsonArray());
285 Integer requiredParameterCount = jsonObject.get("requiredParameterCount") == null ? null : jsonObject.get("requiredParameterCount").getAsInt();
286 Boolean hasNamedParameters = jsonObject.get("hasNamedParameters") == null ? null : jsonObject.get("hasNamedParameters").getAsBoolean();
287 String parameterName = jsonObject.get("parameterName") == null ? null : jsonObject.get("parameterName").getAsString();
288 String parameterType = jsonObject.get("parameterType") == null ? null : jsonObject.get("parameterType").getAsString();
289 String libraryUri = jsonObject.get("libraryUri") == null ? null : jsonObject.get("libraryUri").getAsString();
290 Boolean isNotImported = jsonObject.get("isNotImported") == null ? null : jsonObject.get("isNotImported").getAsBoolean();
291 return new CompletionSuggestion(kind, relevance, completion, displayText, replacementOffset, replacementLength, selectionOffset, selectionLength, isDeprecated, isPotential, docSummary, docComplete, declaringType, defaultArgumentListString, defaultArgumentListTextRanges, element, returnType, parameterNames, parameterTypes, requiredParameterCount, hasNamedParameters, parameterName, parameterType, libraryUri, isNotImported);
292 }
293
294 public static List<CompletionSuggestion> fromJsonArray(JsonArray jsonArray) {
295 if (jsonArray == null) {
296 return EMPTY_LIST;
297 }
298 ArrayList<CompletionSuggestion> list = new ArrayList<CompletionSuggestion>(jsonArray.size());
299 Iterator<JsonElement> iterator = jsonArray.iterator();
300 while (iterator.hasNext()) {
301 list.add(fromJson(iterator.next().getAsJsonObject()));
302 }
303 return list;
304 }
305
306 /**
307 * The identifier to be inserted if the suggestion is selected. If the suggestion is for a method
308 * or function, the client might want to additionally insert a template for the parameters. The
309 * information required in order to do so is contained in other fields.
310 */
311 public String getCompletion() {
312 return completion;
313 }
314
315 /**
316 * The class that declares the element being suggested. This field is omitted if the suggested
317 * element is not a member of a class.
318 */
319 public String getDeclaringType() {
320 return declaringType;
321 }
322
323 /**
324 * A default String for use in generating argument list source contents on the client side.
325 */
327 return defaultArgumentListString;
328 }
329
330 /**
331 * Pairs of offsets and lengths describing 'defaultArgumentListString' text ranges suitable for use
332 * by clients to set up linked edits of default argument source contents. For example, given an
333 * argument list string 'x, y', the corresponding text range [0, 1, 3, 1], indicates two text
334 * ranges of length 1, starting at offsets 0 and 3. Clients can use these ranges to treat the 'x'
335 * and 'y' values specially for linked edits.
336 */
338 return defaultArgumentListTextRanges;
339 }
340
341 /**
342 * Text to be displayed in, for example, a completion pop-up. This field is only defined if the
343 * displayed text should be different than the completion. Otherwise it is omitted.
344 */
345 public String getDisplayText() {
346 return displayText;
347 }
348
349 /**
350 * The Dartdoc associated with the element being suggested. This field is omitted if there is no
351 * Dartdoc associated with the element.
352 */
353 public String getDocComplete() {
354 return docComplete;
355 }
356
357 /**
358 * An abbreviated version of the Dartdoc associated with the element being suggested. This field is
359 * omitted if there is no Dartdoc associated with the element.
360 */
361 public String getDocSummary() {
362 return docSummary;
363 }
364
365 /**
366 * Information about the element reference being suggested.
367 */
369 return element;
370 }
371
372 /**
373 * True if the function or method being suggested has at least one named parameter. This field is
374 * omitted if the parameterNames field is omitted.
375 */
376 public Boolean getHasNamedParameters() {
377 return hasNamedParameters;
378 }
379
380 /**
381 * True if the suggested element is deprecated.
382 */
383 public boolean isDeprecated() {
384 return isDeprecated;
385 }
386
387 /**
388 * True if the suggestion is for an element from a not yet imported library. This field is omitted
389 * if the element is declared locally, or is from library is already imported, so that the
390 * suggestion can be inserted as is, or if getSuggestions was used rather than getSuggestions2.
391 */
392 public Boolean getIsNotImported() {
393 return isNotImported;
394 }
395
396 /**
397 * True if the element is not known to be valid for the target. This happens if the type of the
398 * target is dynamic.
399 */
400 public boolean isPotential() {
401 return isPotential;
402 }
403
404 /**
405 * The kind of element being suggested.
406 */
407 public String getKind() {
408 return kind;
409 }
410
411 /**
412 * This field is omitted if getSuggestions was used rather than getSuggestions2.
413 *
414 * This field is omitted if this suggestion corresponds to a locally declared element.
415 *
416 * If this suggestion corresponds to an already imported element, then this field is the URI of a
417 * library that provides this element, not the URI of the library where the element is declared.
418 *
419 * If this suggestion corresponds to an element from a not yet imported library, this field is the
420 * URI of a library that could be imported to make this suggestion accessible in the file where
421 * completion was requested, such as package:foo/bar.dart or
422 * file:///home/me/workspace/foo/test/bar_test.dart.
423 */
424 public String getLibraryUri() {
425 return libraryUri;
426 }
427
428 /**
429 * The name of the optional parameter being suggested. This field is omitted if the suggestion is
430 * not the addition of an optional argument within an argument list.
431 */
432 public String getParameterName() {
433 return parameterName;
434 }
435
436 /**
437 * The names of the parameters of the function or method being suggested. This field is omitted if
438 * the suggested element is not a setter, function or method.
439 */
441 return parameterNames;
442 }
443
444 /**
445 * The type of the options parameter being suggested. This field is omitted if the parameterName
446 * field is omitted.
447 */
448 public String getParameterType() {
449 return parameterType;
450 }
451
452 /**
453 * The types of the parameters of the function or method being suggested. This field is omitted if
454 * the parameterNames field is omitted.
455 */
457 return parameterTypes;
458 }
459
460 /**
461 * The relevance of this completion suggestion where a higher number indicates a higher relevance.
462 */
463 public int getRelevance() {
464 return relevance;
465 }
466
467 /**
468 * The length of the text to be replaced. If supplied, this should be used in preference to the
469 * offset provided on the containing completion results. This value may be provided independently
470 * of replacementOffset (for example if only one differs from the completion result value).
471 */
472 public Integer getReplacementLength() {
473 return replacementLength;
474 }
475
476 /**
477 * The offset of the start of the text to be replaced. If supplied, this should be used in
478 * preference to the offset provided on the containing completion results. This value may be
479 * provided independently of replacementLength (for example if only one differs from the completion
480 * result value).
481 */
482 public Integer getReplacementOffset() {
483 return replacementOffset;
484 }
485
486 /**
487 * The number of required parameters for the function or method being suggested. This field is
488 * omitted if the parameterNames field is omitted.
489 */
490 public Integer getRequiredParameterCount() {
491 return requiredParameterCount;
492 }
493
494 /**
495 * The return type of the getter, function or method or the type of the field being suggested. This
496 * field is omitted if the suggested element is not a getter, function or method.
497 */
498 public String getReturnType() {
499 return returnType;
500 }
501
502 /**
503 * The number of characters that should be selected after insertion.
504 */
505 public int getSelectionLength() {
506 return selectionLength;
507 }
508
509 /**
510 * The offset, relative to the beginning of the completion, of where the selection should be placed
511 * after insertion.
512 */
513 public int getSelectionOffset() {
514 return selectionOffset;
515 }
516
517 @Override
518 public int hashCode() {
519 HashCodeBuilder builder = new HashCodeBuilder();
520 builder.append(kind);
521 builder.append(relevance);
522 builder.append(completion);
523 builder.append(displayText);
524 builder.append(replacementOffset);
525 builder.append(replacementLength);
526 builder.append(selectionOffset);
527 builder.append(selectionLength);
528 builder.append(isDeprecated);
529 builder.append(isPotential);
530 builder.append(docSummary);
531 builder.append(docComplete);
532 builder.append(declaringType);
533 builder.append(defaultArgumentListString);
534 builder.append(defaultArgumentListTextRanges);
535 builder.append(element);
536 builder.append(returnType);
537 builder.append(parameterNames);
538 builder.append(parameterTypes);
539 builder.append(requiredParameterCount);
540 builder.append(hasNamedParameters);
541 builder.append(parameterName);
542 builder.append(parameterType);
543 builder.append(libraryUri);
544 builder.append(isNotImported);
545 return builder.toHashCode();
546 }
547
548 public JsonObject toJson() {
549 JsonObject jsonObject = new JsonObject();
550 jsonObject.addProperty("kind", kind);
551 jsonObject.addProperty("relevance", relevance);
552 jsonObject.addProperty("completion", completion);
553 if (displayText != null) {
554 jsonObject.addProperty("displayText", displayText);
555 }
556 if (replacementOffset != null) {
557 jsonObject.addProperty("replacementOffset", replacementOffset);
558 }
559 if (replacementLength != null) {
560 jsonObject.addProperty("replacementLength", replacementLength);
561 }
562 jsonObject.addProperty("selectionOffset", selectionOffset);
563 jsonObject.addProperty("selectionLength", selectionLength);
564 jsonObject.addProperty("isDeprecated", isDeprecated);
565 jsonObject.addProperty("isPotential", isPotential);
566 if (docSummary != null) {
567 jsonObject.addProperty("docSummary", docSummary);
568 }
569 if (docComplete != null) {
570 jsonObject.addProperty("docComplete", docComplete);
571 }
572 if (declaringType != null) {
573 jsonObject.addProperty("declaringType", declaringType);
574 }
575 if (defaultArgumentListString != null) {
576 jsonObject.addProperty("defaultArgumentListString", defaultArgumentListString);
577 }
578 if (defaultArgumentListTextRanges != null) {
579 JsonArray jsonArrayDefaultArgumentListTextRanges = new JsonArray();
580 for (int elt : defaultArgumentListTextRanges) {
581 jsonArrayDefaultArgumentListTextRanges.add(new JsonPrimitive(elt));
582 }
583 jsonObject.add("defaultArgumentListTextRanges", jsonArrayDefaultArgumentListTextRanges);
584 }
585 if (element != null) {
586 jsonObject.add("element", element.toJson());
587 }
588 if (returnType != null) {
589 jsonObject.addProperty("returnType", returnType);
590 }
591 if (parameterNames != null) {
592 JsonArray jsonArrayParameterNames = new JsonArray();
593 for (String elt : parameterNames) {
594 jsonArrayParameterNames.add(new JsonPrimitive(elt));
595 }
596 jsonObject.add("parameterNames", jsonArrayParameterNames);
597 }
598 if (parameterTypes != null) {
599 JsonArray jsonArrayParameterTypes = new JsonArray();
600 for (String elt : parameterTypes) {
601 jsonArrayParameterTypes.add(new JsonPrimitive(elt));
602 }
603 jsonObject.add("parameterTypes", jsonArrayParameterTypes);
604 }
605 if (requiredParameterCount != null) {
606 jsonObject.addProperty("requiredParameterCount", requiredParameterCount);
607 }
608 if (hasNamedParameters != null) {
609 jsonObject.addProperty("hasNamedParameters", hasNamedParameters);
610 }
611 if (parameterName != null) {
612 jsonObject.addProperty("parameterName", parameterName);
613 }
614 if (parameterType != null) {
615 jsonObject.addProperty("parameterType", parameterType);
616 }
617 if (libraryUri != null) {
618 jsonObject.addProperty("libraryUri", libraryUri);
619 }
620 if (isNotImported != null) {
621 jsonObject.addProperty("isNotImported", isNotImported);
622 }
623 return jsonObject;
624 }
625
626 @Override
627 public String toString() {
628 StringBuilder builder = new StringBuilder();
629 builder.append("[");
630 builder.append("kind=");
631 builder.append(kind + ", ");
632 builder.append("relevance=");
633 builder.append(relevance + ", ");
634 builder.append("completion=");
635 builder.append(completion + ", ");
636 builder.append("displayText=");
637 builder.append(displayText + ", ");
638 builder.append("replacementOffset=");
639 builder.append(replacementOffset + ", ");
640 builder.append("replacementLength=");
641 builder.append(replacementLength + ", ");
642 builder.append("selectionOffset=");
643 builder.append(selectionOffset + ", ");
644 builder.append("selectionLength=");
645 builder.append(selectionLength + ", ");
646 builder.append("isDeprecated=");
647 builder.append(isDeprecated + ", ");
648 builder.append("isPotential=");
649 builder.append(isPotential + ", ");
650 builder.append("docSummary=");
651 builder.append(docSummary + ", ");
652 builder.append("docComplete=");
653 builder.append(docComplete + ", ");
654 builder.append("declaringType=");
655 builder.append(declaringType + ", ");
656 builder.append("defaultArgumentListString=");
657 builder.append(defaultArgumentListString + ", ");
658 builder.append("defaultArgumentListTextRanges=");
659 builder.append(StringUtils.join(defaultArgumentListTextRanges, ", ") + ", ");
660 builder.append("element=");
661 builder.append(element + ", ");
662 builder.append("returnType=");
663 builder.append(returnType + ", ");
664 builder.append("parameterNames=");
665 builder.append(StringUtils.join(parameterNames, ", ") + ", ");
666 builder.append("parameterTypes=");
667 builder.append(StringUtils.join(parameterTypes, ", ") + ", ");
668 builder.append("requiredParameterCount=");
669 builder.append(requiredParameterCount + ", ");
670 builder.append("hasNamedParameters=");
671 builder.append(hasNamedParameters + ", ");
672 builder.append("parameterName=");
673 builder.append(parameterName + ", ");
674 builder.append("parameterType=");
675 builder.append(parameterType + ", ");
676 builder.append("libraryUri=");
677 builder.append(libraryUri + ", ");
678 builder.append("isNotImported=");
679 builder.append(isNotImported);
680 builder.append("]");
681 return builder.toString();
682 }
683
684}
static CompletionSuggestion fromJson(JsonObject jsonObject)
CompletionSuggestion(String kind, int relevance, String completion, String displayText, Integer replacementOffset, Integer replacementLength, int selectionOffset, int selectionLength, boolean isDeprecated, boolean isPotential, String docSummary, String docComplete, String declaringType, String defaultArgumentListString, int[] defaultArgumentListTextRanges, Element element, String returnType, List< String > parameterNames, List< String > parameterTypes, Integer requiredParameterCount, Boolean hasNamedParameters, String parameterName, String parameterType, String libraryUri, Boolean isNotImported)
static List< CompletionSuggestion > fromJsonArray(JsonArray jsonArray)
static Element fromJson(JsonObject jsonObject)
Definition Element.java:134