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.RuntimeCompletionExpressionType Class Reference

Public Member Functions

 RuntimeCompletionExpressionType (String libraryPath, String kind, String name, List< RuntimeCompletionExpressionType > typeArguments, RuntimeCompletionExpressionType returnType, List< RuntimeCompletionExpressionType > parameterTypes, List< String > parameterNames)
 
boolean equals (Object obj)
 
String getKind ()
 
String getLibraryPath ()
 
String getName ()
 
List< String > getParameterNames ()
 
List< RuntimeCompletionExpressionTypegetParameterTypes ()
 
RuntimeCompletionExpressionType getReturnType ()
 
List< RuntimeCompletionExpressionTypegetTypeArguments ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static RuntimeCompletionExpressionType fromJson (JsonObject jsonObject)
 
static List< RuntimeCompletionExpressionTypefromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final RuntimeCompletionExpressionType[] EMPTY_ARRAY = new RuntimeCompletionExpressionType[0]
 
static final List< RuntimeCompletionExpressionTypeEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A type at runtime.

@coverage dart.server.generated.types

Definition at line 32 of file RuntimeCompletionExpressionType.java.

Constructor & Destructor Documentation

◆ RuntimeCompletionExpressionType()

org.dartlang.analysis.server.protocol.RuntimeCompletionExpressionType.RuntimeCompletionExpressionType ( String  libraryPath,
String  kind,
String  name,
List< RuntimeCompletionExpressionType typeArguments,
RuntimeCompletionExpressionType  returnType,
List< RuntimeCompletionExpressionType parameterTypes,
List< String >  parameterNames 
)
inline

Constructor for RuntimeCompletionExpressionType.

Definition at line 81 of file RuntimeCompletionExpressionType.java.

81 {
82 this.libraryPath = libraryPath;
83 this.kind = kind;
84 this.name = name;
85 this.typeArguments = typeArguments;
86 this.returnType = returnType;
87 this.parameterTypes = parameterTypes;
88 this.parameterNames = parameterNames;
89 }

Member Function Documentation

◆ equals()

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

Definition at line 92 of file RuntimeCompletionExpressionType.java.

92 {
93 if (obj instanceof RuntimeCompletionExpressionType) {
94 RuntimeCompletionExpressionType other = (RuntimeCompletionExpressionType) obj;
95 return
96 ObjectUtilities.equals(other.libraryPath, libraryPath) &&
97 ObjectUtilities.equals(other.kind, kind) &&
98 ObjectUtilities.equals(other.name, name) &&
99 ObjectUtilities.equals(other.typeArguments, typeArguments) &&
100 ObjectUtilities.equals(other.returnType, returnType) &&
101 ObjectUtilities.equals(other.parameterTypes, parameterTypes) &&
102 ObjectUtilities.equals(other.parameterNames, parameterNames);
103 }
104 return false;
105 }

◆ fromJson()

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

Definition at line 107 of file RuntimeCompletionExpressionType.java.

107 {
108 String libraryPath = jsonObject.get("libraryPath") == null ? null : jsonObject.get("libraryPath").getAsString();
109 String kind = jsonObject.get("kind").getAsString();
110 String name = jsonObject.get("name") == null ? null : jsonObject.get("name").getAsString();
111 List<RuntimeCompletionExpressionType> typeArguments = jsonObject.get("typeArguments") == null ? null : RuntimeCompletionExpressionType.fromJsonArray(jsonObject.get("typeArguments").getAsJsonArray());
112 RuntimeCompletionExpressionType returnType = jsonObject.get("returnType") == null ? null : RuntimeCompletionExpressionType.fromJson(jsonObject.get("returnType").getAsJsonObject());
113 List<RuntimeCompletionExpressionType> parameterTypes = jsonObject.get("parameterTypes") == null ? null : RuntimeCompletionExpressionType.fromJsonArray(jsonObject.get("parameterTypes").getAsJsonArray());
114 List<String> parameterNames = jsonObject.get("parameterNames") == null ? null : JsonUtilities.decodeStringList(jsonObject.get("parameterNames").getAsJsonArray());
115 return new RuntimeCompletionExpressionType(libraryPath, kind, name, typeArguments, returnType, parameterTypes, parameterNames);
116 }
RuntimeCompletionExpressionType(String libraryPath, String kind, String name, List< RuntimeCompletionExpressionType > typeArguments, RuntimeCompletionExpressionType returnType, List< RuntimeCompletionExpressionType > parameterTypes, List< String > parameterNames)

◆ fromJsonArray()

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

Definition at line 118 of file RuntimeCompletionExpressionType.java.

118 {
119 if (jsonArray == null) {
120 return EMPTY_LIST;
121 }
122 ArrayList<RuntimeCompletionExpressionType> list = new ArrayList<RuntimeCompletionExpressionType>(jsonArray.size());
123 Iterator<JsonElement> iterator = jsonArray.iterator();
124 while (iterator.hasNext()) {
125 list.add(fromJson(iterator.next().getAsJsonObject()));
126 }
127 return list;
128 }
static RuntimeCompletionExpressionType fromJson(JsonObject jsonObject)

◆ getKind()

String org.dartlang.analysis.server.protocol.RuntimeCompletionExpressionType.getKind ( )
inline

The kind of the type.

Definition at line 133 of file RuntimeCompletionExpressionType.java.

133 {
134 return kind;
135 }

◆ getLibraryPath()

String org.dartlang.analysis.server.protocol.RuntimeCompletionExpressionType.getLibraryPath ( )
inline

The path of the library that has this type. Omitted if the type is not declared in any library, e.g. "dynamic", or "void".

Definition at line 141 of file RuntimeCompletionExpressionType.java.

141 {
142 return libraryPath;
143 }

◆ getName()

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

The name of the type. Omitted if the type does not have a name, e.g. an inline function type.

Definition at line 148 of file RuntimeCompletionExpressionType.java.

148 {
149 return name;
150 }

◆ getParameterNames()

List< String > org.dartlang.analysis.server.protocol.RuntimeCompletionExpressionType.getParameterNames ( )
inline

If the type is a function type, the names of the function parameters of all kinds - required, optional positional, and optional named. The names of positional parameters are empty strings. Omitted if the type is not a function type.

Definition at line 157 of file RuntimeCompletionExpressionType.java.

157 {
158 return parameterNames;
159 }

◆ getParameterTypes()

List< RuntimeCompletionExpressionType > org.dartlang.analysis.server.protocol.RuntimeCompletionExpressionType.getParameterTypes ( )
inline

If the type is a function type, the types of the function parameters of all kinds - required, optional positional, and optional named. Omitted if the type is not a function type.

Definition at line 165 of file RuntimeCompletionExpressionType.java.

165 {
166 return parameterTypes;
167 }

◆ getReturnType()

RuntimeCompletionExpressionType org.dartlang.analysis.server.protocol.RuntimeCompletionExpressionType.getReturnType ( )
inline

If the type is a function type, the return type of the function. Omitted if the type is not a function type.

Definition at line 173 of file RuntimeCompletionExpressionType.java.

173 {
174 return returnType;
175 }

◆ getTypeArguments()

List< RuntimeCompletionExpressionType > org.dartlang.analysis.server.protocol.RuntimeCompletionExpressionType.getTypeArguments ( )
inline

The type arguments of the type. Omitted if the type does not have type parameters.

Definition at line 180 of file RuntimeCompletionExpressionType.java.

180 {
181 return typeArguments;
182 }

◆ hashCode()

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

Definition at line 185 of file RuntimeCompletionExpressionType.java.

185 {
186 HashCodeBuilder builder = new HashCodeBuilder();
187 builder.append(libraryPath);
188 builder.append(kind);
189 builder.append(name);
190 builder.append(typeArguments);
191 builder.append(returnType);
192 builder.append(parameterTypes);
193 builder.append(parameterNames);
194 return builder.toHashCode();
195 }

◆ toJson()

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

Definition at line 197 of file RuntimeCompletionExpressionType.java.

197 {
198 JsonObject jsonObject = new JsonObject();
199 if (libraryPath != null) {
200 jsonObject.addProperty("libraryPath", libraryPath);
201 }
202 jsonObject.addProperty("kind", kind);
203 if (name != null) {
204 jsonObject.addProperty("name", name);
205 }
206 if (typeArguments != null) {
207 JsonArray jsonArrayTypeArguments = new JsonArray();
208 for (RuntimeCompletionExpressionType elt : typeArguments) {
209 jsonArrayTypeArguments.add(elt.toJson());
210 }
211 jsonObject.add("typeArguments", jsonArrayTypeArguments);
212 }
213 if (returnType != null) {
214 jsonObject.add("returnType", returnType.toJson());
215 }
216 if (parameterTypes != null) {
217 JsonArray jsonArrayParameterTypes = new JsonArray();
218 for (RuntimeCompletionExpressionType elt : parameterTypes) {
219 jsonArrayParameterTypes.add(elt.toJson());
220 }
221 jsonObject.add("parameterTypes", jsonArrayParameterTypes);
222 }
223 if (parameterNames != null) {
224 JsonArray jsonArrayParameterNames = new JsonArray();
225 for (String elt : parameterNames) {
226 jsonArrayParameterNames.add(new JsonPrimitive(elt));
227 }
228 jsonObject.add("parameterNames", jsonArrayParameterNames);
229 }
230 return jsonObject;
231 }

◆ toString()

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

Definition at line 234 of file RuntimeCompletionExpressionType.java.

234 {
235 StringBuilder builder = new StringBuilder();
236 builder.append("[");
237 builder.append("libraryPath=");
238 builder.append(libraryPath + ", ");
239 builder.append("kind=");
240 builder.append(kind + ", ");
241 builder.append("name=");
242 builder.append(name + ", ");
243 builder.append("typeArguments=");
244 builder.append(StringUtils.join(typeArguments, ", ") + ", ");
245 builder.append("returnType=");
246 builder.append(returnType + ", ");
247 builder.append("parameterTypes=");
248 builder.append(StringUtils.join(parameterTypes, ", ") + ", ");
249 builder.append("parameterNames=");
250 builder.append(StringUtils.join(parameterNames, ", "));
251 builder.append("]");
252 return builder.toString();
253 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file RuntimeCompletionExpressionType.java.

◆ EMPTY_LIST

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

Definition at line 36 of file RuntimeCompletionExpressionType.java.


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