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

Public Member Functions

 BulkFix (String path, List< BulkFixDetail > fixes)
 
boolean equals (Object obj)
 
List< BulkFixDetailgetFixes ()
 
String getPath ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static BulkFix fromJson (JsonObject jsonObject)
 
static List< BulkFixfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final BulkFix[] EMPTY_ARRAY = new BulkFix[0]
 
static final List< BulkFixEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A description of bulk fixes to a library.

@coverage dart.server.generated.types

Definition at line 32 of file BulkFix.java.

Constructor & Destructor Documentation

◆ BulkFix()

org.dartlang.analysis.server.protocol.BulkFix.BulkFix ( String  path,
List< BulkFixDetail fixes 
)
inline

Constructor for BulkFix.

Definition at line 51 of file BulkFix.java.

51 {
52 this.path = path;
53 this.fixes = fixes;
54 }

Member Function Documentation

◆ equals()

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

Definition at line 57 of file BulkFix.java.

57 {
58 if (obj instanceof BulkFix) {
59 BulkFix other = (BulkFix) obj;
60 return
61 ObjectUtilities.equals(other.path, path) &&
62 ObjectUtilities.equals(other.fixes, fixes);
63 }
64 return false;
65 }
BulkFix(String path, List< BulkFixDetail > fixes)
Definition: BulkFix.java:51

◆ fromJson()

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

Definition at line 67 of file BulkFix.java.

67 {
68 String path = jsonObject.get("path").getAsString();
69 List<BulkFixDetail> fixes = BulkFixDetail.fromJsonArray(jsonObject.get("fixes").getAsJsonArray());
70 return new BulkFix(path, fixes);
71 }

◆ fromJsonArray()

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

Definition at line 73 of file BulkFix.java.

73 {
74 if (jsonArray == null) {
75 return EMPTY_LIST;
76 }
77 ArrayList<BulkFix> list = new ArrayList<BulkFix>(jsonArray.size());
78 Iterator<JsonElement> iterator = jsonArray.iterator();
79 while (iterator.hasNext()) {
80 list.add(fromJson(iterator.next().getAsJsonObject()));
81 }
82 return list;
83 }
static final List< BulkFix > EMPTY_LIST
Definition: BulkFix.java:36
static BulkFix fromJson(JsonObject jsonObject)
Definition: BulkFix.java:67

◆ getFixes()

List< BulkFixDetail > org.dartlang.analysis.server.protocol.BulkFix.getFixes ( )
inline

A list of bulk fix details.

Definition at line 88 of file BulkFix.java.

88 {
89 return fixes;
90 }

◆ getPath()

String org.dartlang.analysis.server.protocol.BulkFix.getPath ( )
inline

The path of the library.

Definition at line 95 of file BulkFix.java.

95 {
96 return path;
97 }

◆ hashCode()

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

Definition at line 100 of file BulkFix.java.

100 {
101 HashCodeBuilder builder = new HashCodeBuilder();
102 builder.append(path);
103 builder.append(fixes);
104 return builder.toHashCode();
105 }

◆ toJson()

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

Definition at line 107 of file BulkFix.java.

107 {
108 JsonObject jsonObject = new JsonObject();
109 jsonObject.addProperty("path", path);
110 JsonArray jsonArrayFixes = new JsonArray();
111 for (BulkFixDetail elt : fixes) {
112 jsonArrayFixes.add(elt.toJson());
113 }
114 jsonObject.add("fixes", jsonArrayFixes);
115 return jsonObject;
116 }

◆ toString()

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

Definition at line 119 of file BulkFix.java.

119 {
120 StringBuilder builder = new StringBuilder();
121 builder.append("[");
122 builder.append("path=");
123 builder.append(path + ", ");
124 builder.append("fixes=");
125 builder.append(StringUtils.join(fixes, ", "));
126 builder.append("]");
127 return builder.toString();
128 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file BulkFix.java.

◆ EMPTY_LIST

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

Definition at line 36 of file BulkFix.java.


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