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

Public Member Functions

 FlutterWidgetPropertyValue (Boolean boolValue, Double doubleValue, Integer intValue, String stringValue, FlutterWidgetPropertyValueEnumItem enumValue, String expression)
 
boolean equals (Object obj)
 
Boolean getBoolValue ()
 
Double getDoubleValue ()
 
FlutterWidgetPropertyValueEnumItem getEnumValue ()
 
String getExpression ()
 
Integer getIntValue ()
 
String getStringValue ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static FlutterWidgetPropertyValue fromJson (JsonObject jsonObject)
 
static List< FlutterWidgetPropertyValuefromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final FlutterWidgetPropertyValue[] EMPTY_ARRAY = new FlutterWidgetPropertyValue[0]
 
static final List< FlutterWidgetPropertyValueEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A value of a property of a Flutter widget.

@coverage dart.server.generated.types

Definition at line 32 of file FlutterWidgetPropertyValue.java.

Constructor & Destructor Documentation

◆ FlutterWidgetPropertyValue()

org.dartlang.analysis.server.protocol.FlutterWidgetPropertyValue.FlutterWidgetPropertyValue ( Boolean  boolValue,
Double  doubleValue,
Integer  intValue,
String  stringValue,
FlutterWidgetPropertyValueEnumItem  enumValue,
String  expression 
)
inline

Constructor for FlutterWidgetPropertyValue.

Definition at line 56 of file FlutterWidgetPropertyValue.java.

56 {
57 this.boolValue = boolValue;
58 this.doubleValue = doubleValue;
59 this.intValue = intValue;
60 this.stringValue = stringValue;
61 this.enumValue = enumValue;
62 this.expression = expression;
63 }

Member Function Documentation

◆ equals()

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

Definition at line 66 of file FlutterWidgetPropertyValue.java.

66 {
67 if (obj instanceof FlutterWidgetPropertyValue) {
68 FlutterWidgetPropertyValue other = (FlutterWidgetPropertyValue) obj;
69 return
70 ObjectUtilities.equals(other.boolValue, boolValue) &&
71 ObjectUtilities.equals(other.doubleValue, doubleValue) &&
72 ObjectUtilities.equals(other.intValue, intValue) &&
73 ObjectUtilities.equals(other.stringValue, stringValue) &&
74 ObjectUtilities.equals(other.enumValue, enumValue) &&
75 ObjectUtilities.equals(other.expression, expression);
76 }
77 return false;
78 }

◆ fromJson()

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

Definition at line 80 of file FlutterWidgetPropertyValue.java.

80 {
81 Boolean boolValue = jsonObject.get("boolValue") == null ? null : jsonObject.get("boolValue").getAsBoolean();
82 Double doubleValue = jsonObject.get("doubleValue") == null ? null : jsonObject.get("doubleValue").getAsDouble();
83 Integer intValue = jsonObject.get("intValue") == null ? null : jsonObject.get("intValue").getAsInt();
84 String stringValue = jsonObject.get("stringValue") == null ? null : jsonObject.get("stringValue").getAsString();
85 FlutterWidgetPropertyValueEnumItem enumValue = jsonObject.get("enumValue") == null ? null : FlutterWidgetPropertyValueEnumItem.fromJson(jsonObject.get("enumValue").getAsJsonObject());
86 String expression = jsonObject.get("expression") == null ? null : jsonObject.get("expression").getAsString();
87 return new FlutterWidgetPropertyValue(boolValue, doubleValue, intValue, stringValue, enumValue, expression);
88 }
static FlutterWidgetPropertyValueEnumItem fromJson(JsonObject jsonObject)
FlutterWidgetPropertyValue(Boolean boolValue, Double doubleValue, Integer intValue, String stringValue, FlutterWidgetPropertyValueEnumItem enumValue, String expression)

◆ fromJsonArray()

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

Definition at line 90 of file FlutterWidgetPropertyValue.java.

90 {
91 if (jsonArray == null) {
92 return EMPTY_LIST;
93 }
94 ArrayList<FlutterWidgetPropertyValue> list = new ArrayList<FlutterWidgetPropertyValue>(jsonArray.size());
95 Iterator<JsonElement> iterator = jsonArray.iterator();
96 while (iterator.hasNext()) {
97 list.add(fromJson(iterator.next().getAsJsonObject()));
98 }
99 return list;
100 }
static FlutterWidgetPropertyValue fromJson(JsonObject jsonObject)

◆ getBoolValue()

Boolean org.dartlang.analysis.server.protocol.FlutterWidgetPropertyValue.getBoolValue ( )
inline

Definition at line 102 of file FlutterWidgetPropertyValue.java.

102 {
103 return boolValue;
104 }

◆ getDoubleValue()

Double org.dartlang.analysis.server.protocol.FlutterWidgetPropertyValue.getDoubleValue ( )
inline

Definition at line 106 of file FlutterWidgetPropertyValue.java.

106 {
107 return doubleValue;
108 }

◆ getEnumValue()

FlutterWidgetPropertyValueEnumItem org.dartlang.analysis.server.protocol.FlutterWidgetPropertyValue.getEnumValue ( )
inline

Definition at line 110 of file FlutterWidgetPropertyValue.java.

110 {
111 return enumValue;
112 }

◆ getExpression()

String org.dartlang.analysis.server.protocol.FlutterWidgetPropertyValue.getExpression ( )
inline

A free-form expression, which will be used as the value as is.

Definition at line 117 of file FlutterWidgetPropertyValue.java.

117 {
118 return expression;
119 }

◆ getIntValue()

Integer org.dartlang.analysis.server.protocol.FlutterWidgetPropertyValue.getIntValue ( )
inline

Definition at line 121 of file FlutterWidgetPropertyValue.java.

121 {
122 return intValue;
123 }

◆ getStringValue()

String org.dartlang.analysis.server.protocol.FlutterWidgetPropertyValue.getStringValue ( )
inline

Definition at line 125 of file FlutterWidgetPropertyValue.java.

125 {
126 return stringValue;
127 }

◆ hashCode()

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

Definition at line 130 of file FlutterWidgetPropertyValue.java.

130 {
131 HashCodeBuilder builder = new HashCodeBuilder();
132 builder.append(boolValue);
133 builder.append(doubleValue);
134 builder.append(intValue);
135 builder.append(stringValue);
136 builder.append(enumValue);
137 builder.append(expression);
138 return builder.toHashCode();
139 }

◆ toJson()

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

Definition at line 141 of file FlutterWidgetPropertyValue.java.

141 {
142 JsonObject jsonObject = new JsonObject();
143 if (boolValue != null) {
144 jsonObject.addProperty("boolValue", boolValue);
145 }
146 if (doubleValue != null) {
147 jsonObject.addProperty("doubleValue", doubleValue);
148 }
149 if (intValue != null) {
150 jsonObject.addProperty("intValue", intValue);
151 }
152 if (stringValue != null) {
153 jsonObject.addProperty("stringValue", stringValue);
154 }
155 if (enumValue != null) {
156 jsonObject.add("enumValue", enumValue.toJson());
157 }
158 if (expression != null) {
159 jsonObject.addProperty("expression", expression);
160 }
161 return jsonObject;
162 }

◆ toString()

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

Definition at line 165 of file FlutterWidgetPropertyValue.java.

165 {
166 StringBuilder builder = new StringBuilder();
167 builder.append("[");
168 builder.append("boolValue=");
169 builder.append(boolValue + ", ");
170 builder.append("doubleValue=");
171 builder.append(doubleValue + ", ");
172 builder.append("intValue=");
173 builder.append(intValue + ", ");
174 builder.append("stringValue=");
175 builder.append(stringValue + ", ");
176 builder.append("enumValue=");
177 builder.append(enumValue + ", ");
178 builder.append("expression=");
179 builder.append(expression);
180 builder.append("]");
181 return builder.toString();
182 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file FlutterWidgetPropertyValue.java.

◆ EMPTY_LIST

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

Definition at line 36 of file FlutterWidgetPropertyValue.java.


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