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

Public Member Functions

 RuntimeCompletionVariable (String name, RuntimeCompletionExpressionType type)
 
boolean equals (Object obj)
 
String getName ()
 
RuntimeCompletionExpressionType getType ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static RuntimeCompletionVariable fromJson (JsonObject jsonObject)
 
static List< RuntimeCompletionVariablefromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final RuntimeCompletionVariable[] EMPTY_ARRAY = new RuntimeCompletionVariable[0]
 
static final List< RuntimeCompletionVariableEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A variable in a runtime context.

@coverage dart.server.generated.types

Definition at line 32 of file RuntimeCompletionVariable.java.

Constructor & Destructor Documentation

◆ RuntimeCompletionVariable()

org.dartlang.analysis.server.protocol.RuntimeCompletionVariable.RuntimeCompletionVariable ( String  name,
RuntimeCompletionExpressionType  type 
)
inline

Constructor for RuntimeCompletionVariable.

Definition at line 52 of file RuntimeCompletionVariable.java.

52 {
53 this.name = name;
54 this.type = type;
55 }

Member Function Documentation

◆ equals()

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

Definition at line 58 of file RuntimeCompletionVariable.java.

58 {
59 if (obj instanceof RuntimeCompletionVariable) {
60 RuntimeCompletionVariable other = (RuntimeCompletionVariable) obj;
61 return
62 ObjectUtilities.equals(other.name, name) &&
63 ObjectUtilities.equals(other.type, type);
64 }
65 return false;
66 }

◆ fromJson()

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

Definition at line 68 of file RuntimeCompletionVariable.java.

68 {
69 String name = jsonObject.get("name").getAsString();
70 RuntimeCompletionExpressionType type = RuntimeCompletionExpressionType.fromJson(jsonObject.get("type").getAsJsonObject());
71 return new RuntimeCompletionVariable(name, type);
72 }
static RuntimeCompletionExpressionType fromJson(JsonObject jsonObject)
RuntimeCompletionVariable(String name, RuntimeCompletionExpressionType type)

◆ fromJsonArray()

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

Definition at line 74 of file RuntimeCompletionVariable.java.

74 {
75 if (jsonArray == null) {
76 return EMPTY_LIST;
77 }
78 ArrayList<RuntimeCompletionVariable> list = new ArrayList<RuntimeCompletionVariable>(jsonArray.size());
79 Iterator<JsonElement> iterator = jsonArray.iterator();
80 while (iterator.hasNext()) {
81 list.add(fromJson(iterator.next().getAsJsonObject()));
82 }
83 return list;
84 }
static RuntimeCompletionVariable fromJson(JsonObject jsonObject)

◆ getName()

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

The name of the variable. The name "this" has a special meaning and is used as an implicit target for runtime completion, and in explicit "this" references.

Definition at line 90 of file RuntimeCompletionVariable.java.

90 {
91 return name;
92 }

◆ getType()

RuntimeCompletionExpressionType org.dartlang.analysis.server.protocol.RuntimeCompletionVariable.getType ( )
inline

The type of the variable.

Definition at line 97 of file RuntimeCompletionVariable.java.

97 {
98 return type;
99 }

◆ hashCode()

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

Definition at line 102 of file RuntimeCompletionVariable.java.

102 {
103 HashCodeBuilder builder = new HashCodeBuilder();
104 builder.append(name);
105 builder.append(type);
106 return builder.toHashCode();
107 }

◆ toJson()

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

Definition at line 109 of file RuntimeCompletionVariable.java.

109 {
110 JsonObject jsonObject = new JsonObject();
111 jsonObject.addProperty("name", name);
112 jsonObject.add("type", type.toJson());
113 return jsonObject;
114 }

◆ toString()

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

Definition at line 117 of file RuntimeCompletionVariable.java.

117 {
118 StringBuilder builder = new StringBuilder();
119 builder.append("[");
120 builder.append("name=");
121 builder.append(name + ", ");
122 builder.append("type=");
123 builder.append(type);
124 builder.append("]");
125 return builder.toString();
126 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file RuntimeCompletionVariable.java.

◆ EMPTY_LIST

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

Definition at line 36 of file RuntimeCompletionVariable.java.


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