Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
org.dartlang.analysis.server.protocol.FlutterOutlineAttribute Class Reference

Public Member Functions

 FlutterOutlineAttribute (String name, String label, Boolean literalValueBoolean, Integer literalValueInteger, String literalValueString, Location nameLocation, Location valueLocation)
 
boolean equals (Object obj)
 
String getLabel ()
 
Boolean getLiteralValueBoolean ()
 
Integer getLiteralValueInteger ()
 
String getLiteralValueString ()
 
String getName ()
 
Location getNameLocation ()
 
Location getValueLocation ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static FlutterOutlineAttribute fromJson (JsonObject jsonObject)
 
static List< FlutterOutlineAttributefromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final FlutterOutlineAttribute[] EMPTY_ARRAY = new FlutterOutlineAttribute[0]
 
static final List< FlutterOutlineAttributeEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

An attribute for a FlutterOutline.

@coverage dart.server.generated.types

Definition at line 32 of file FlutterOutlineAttribute.java.

Constructor & Destructor Documentation

◆ FlutterOutlineAttribute()

org.dartlang.analysis.server.protocol.FlutterOutlineAttribute.FlutterOutlineAttribute ( String  name,
String  label,
Boolean  literalValueBoolean,
Integer  literalValueInteger,
String  literalValueString,
Location  nameLocation,
Location  valueLocation 
)
inline

Constructor for FlutterOutlineAttribute.

Definition at line 83 of file FlutterOutlineAttribute.java.

83 {
84 this.name = name;
85 this.label = label;
86 this.literalValueBoolean = literalValueBoolean;
87 this.literalValueInteger = literalValueInteger;
88 this.literalValueString = literalValueString;
89 this.nameLocation = nameLocation;
90 this.valueLocation = valueLocation;
91 }

Member Function Documentation

◆ equals()

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

Definition at line 94 of file FlutterOutlineAttribute.java.

94 {
95 if (obj instanceof FlutterOutlineAttribute) {
97 return
98 ObjectUtilities.equals(other.name, name) &&
99 ObjectUtilities.equals(other.label, label) &&
100 ObjectUtilities.equals(other.literalValueBoolean, literalValueBoolean) &&
101 ObjectUtilities.equals(other.literalValueInteger, literalValueInteger) &&
102 ObjectUtilities.equals(other.literalValueString, literalValueString) &&
103 ObjectUtilities.equals(other.nameLocation, nameLocation) &&
104 ObjectUtilities.equals(other.valueLocation, valueLocation);
105 }
106 return false;
107 }
FlutterOutlineAttribute(String name, String label, Boolean literalValueBoolean, Integer literalValueInteger, String literalValueString, Location nameLocation, Location valueLocation)

◆ fromJson()

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

Definition at line 109 of file FlutterOutlineAttribute.java.

109 {
110 String name = jsonObject.get("name").getAsString();
111 String label = jsonObject.get("label").getAsString();
112 Boolean literalValueBoolean = jsonObject.get("literalValueBoolean") == null ? null : jsonObject.get("literalValueBoolean").getAsBoolean();
113 Integer literalValueInteger = jsonObject.get("literalValueInteger") == null ? null : jsonObject.get("literalValueInteger").getAsInt();
114 String literalValueString = jsonObject.get("literalValueString") == null ? null : jsonObject.get("literalValueString").getAsString();
115 Location nameLocation = jsonObject.get("nameLocation") == null ? null : Location.fromJson(jsonObject.get("nameLocation").getAsJsonObject());
116 Location valueLocation = jsonObject.get("valueLocation") == null ? null : Location.fromJson(jsonObject.get("valueLocation").getAsJsonObject());
117 return new FlutterOutlineAttribute(name, label, literalValueBoolean, literalValueInteger, literalValueString, nameLocation, valueLocation);
118 }
static Location fromJson(JsonObject jsonObject)
Definition: Location.java:102

◆ fromJsonArray()

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

Definition at line 120 of file FlutterOutlineAttribute.java.

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

◆ getLabel()

String org.dartlang.analysis.server.protocol.FlutterOutlineAttribute.getLabel ( )
inline

The label of the attribute value, usually the Dart code. It might be quite long, the client should abbreviate as needed.

Definition at line 136 of file FlutterOutlineAttribute.java.

136 {
137 return label;
138 }

◆ getLiteralValueBoolean()

Boolean org.dartlang.analysis.server.protocol.FlutterOutlineAttribute.getLiteralValueBoolean ( )
inline

The boolean literal value of the attribute. This field is absent if the value is not a boolean literal.

Definition at line 144 of file FlutterOutlineAttribute.java.

144 {
145 return literalValueBoolean;
146 }

◆ getLiteralValueInteger()

Integer org.dartlang.analysis.server.protocol.FlutterOutlineAttribute.getLiteralValueInteger ( )
inline

The integer literal value of the attribute. This field is absent if the value is not an integer literal.

Definition at line 152 of file FlutterOutlineAttribute.java.

152 {
153 return literalValueInteger;
154 }

◆ getLiteralValueString()

String org.dartlang.analysis.server.protocol.FlutterOutlineAttribute.getLiteralValueString ( )
inline

The string literal value of the attribute. This field is absent if the value is not a string literal.

Definition at line 160 of file FlutterOutlineAttribute.java.

160 {
161 return literalValueString;
162 }

◆ getName()

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

The name of the attribute.

Definition at line 167 of file FlutterOutlineAttribute.java.

167 {
168 return name;
169 }

◆ getNameLocation()

Location org.dartlang.analysis.server.protocol.FlutterOutlineAttribute.getNameLocation ( )
inline

If the attribute is a named argument, the location of the name, without the colon.

Definition at line 174 of file FlutterOutlineAttribute.java.

174 {
175 return nameLocation;
176 }

◆ getValueLocation()

Location org.dartlang.analysis.server.protocol.FlutterOutlineAttribute.getValueLocation ( )
inline

The location of the value.

This field is always available, but marked optional for backward compatibility between new clients with older servers.

Definition at line 184 of file FlutterOutlineAttribute.java.

184 {
185 return valueLocation;
186 }

◆ hashCode()

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

Definition at line 189 of file FlutterOutlineAttribute.java.

189 {
190 HashCodeBuilder builder = new HashCodeBuilder();
191 builder.append(name);
192 builder.append(label);
193 builder.append(literalValueBoolean);
194 builder.append(literalValueInteger);
195 builder.append(literalValueString);
196 builder.append(nameLocation);
197 builder.append(valueLocation);
198 return builder.toHashCode();
199 }

◆ toJson()

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

Definition at line 201 of file FlutterOutlineAttribute.java.

201 {
202 JsonObject jsonObject = new JsonObject();
203 jsonObject.addProperty("name", name);
204 jsonObject.addProperty("label", label);
205 if (literalValueBoolean != null) {
206 jsonObject.addProperty("literalValueBoolean", literalValueBoolean);
207 }
208 if (literalValueInteger != null) {
209 jsonObject.addProperty("literalValueInteger", literalValueInteger);
210 }
211 if (literalValueString != null) {
212 jsonObject.addProperty("literalValueString", literalValueString);
213 }
214 if (nameLocation != null) {
215 jsonObject.add("nameLocation", nameLocation.toJson());
216 }
217 if (valueLocation != null) {
218 jsonObject.add("valueLocation", valueLocation.toJson());
219 }
220 return jsonObject;
221 }

◆ toString()

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

Definition at line 224 of file FlutterOutlineAttribute.java.

224 {
225 StringBuilder builder = new StringBuilder();
226 builder.append("[");
227 builder.append("name=");
228 builder.append(name + ", ");
229 builder.append("label=");
230 builder.append(label + ", ");
231 builder.append("literalValueBoolean=");
232 builder.append(literalValueBoolean + ", ");
233 builder.append("literalValueInteger=");
234 builder.append(literalValueInteger + ", ");
235 builder.append("literalValueString=");
236 builder.append(literalValueString + ", ");
237 builder.append("nameLocation=");
238 builder.append(nameLocation + ", ");
239 builder.append("valueLocation=");
240 builder.append(valueLocation);
241 builder.append("]");
242 return builder.toString();
243 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file FlutterOutlineAttribute.java.

◆ EMPTY_LIST

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

Definition at line 36 of file FlutterOutlineAttribute.java.


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