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

Public Member Functions

 AddContentOverlay (String content)
 
boolean equals (Object obj)
 
String getContent ()
 
String getType ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static AddContentOverlay fromJson (JsonObject jsonObject)
 
static List< AddContentOverlayfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final AddContentOverlay[] EMPTY_ARRAY = new AddContentOverlay[0]
 
static final List< AddContentOverlayEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A directive to begin overlaying the contents of a file. The supplied content will be used for analysis in place of the file contents in the filesystem.

If this directive is used on a file that already has a file content overlay, the old overlay is discarded and replaced with the new one.

@coverage dart.server.generated.types

Definition at line 36 of file AddContentOverlay.java.

Constructor & Destructor Documentation

◆ AddContentOverlay()

org.dartlang.analysis.server.protocol.AddContentOverlay.AddContentOverlay ( String  content)
inline

Constructor for AddContentOverlay.

Definition at line 52 of file AddContentOverlay.java.

52 {
53 this.type = "add";
54 this.content = content;
55 }

Member Function Documentation

◆ equals()

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

Definition at line 58 of file AddContentOverlay.java.

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

◆ fromJson()

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

Definition at line 68 of file AddContentOverlay.java.

68 {
69 String type = jsonObject.get("type").getAsString();
70 String content = jsonObject.get("content").getAsString();
71 return new AddContentOverlay(content);
72 }

◆ fromJsonArray()

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

Definition at line 74 of file AddContentOverlay.java.

74 {
75 if (jsonArray == null) {
76 return EMPTY_LIST;
77 }
78 ArrayList<AddContentOverlay> list = new ArrayList<AddContentOverlay>(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 AddContentOverlay fromJson(JsonObject jsonObject)
static final List< AddContentOverlay > EMPTY_LIST

◆ getContent()

String org.dartlang.analysis.server.protocol.AddContentOverlay.getContent ( )
inline

The new content of the file.

Definition at line 89 of file AddContentOverlay.java.

89 {
90 return content;
91 }

◆ getType()

String org.dartlang.analysis.server.protocol.AddContentOverlay.getType ( )
inline

Definition at line 93 of file AddContentOverlay.java.

93 {
94 return type;
95 }

◆ hashCode()

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

Definition at line 98 of file AddContentOverlay.java.

98 {
99 HashCodeBuilder builder = new HashCodeBuilder();
100 builder.append(type);
101 builder.append(content);
102 return builder.toHashCode();
103 }

◆ toJson()

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

Definition at line 105 of file AddContentOverlay.java.

105 {
106 JsonObject jsonObject = new JsonObject();
107 jsonObject.addProperty("type", type);
108 jsonObject.addProperty("content", content);
109 return jsonObject;
110 }

◆ toString()

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

Definition at line 113 of file AddContentOverlay.java.

113 {
114 StringBuilder builder = new StringBuilder();
115 builder.append("[");
116 builder.append("type=");
117 builder.append(type + ", ");
118 builder.append("content=");
119 builder.append(content);
120 builder.append("]");
121 return builder.toString();
122 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 38 of file AddContentOverlay.java.

◆ EMPTY_LIST

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

Definition at line 40 of file AddContentOverlay.java.


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