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

Public Member Functions

 BulkFixDetail (String code, int occurrences)
 
boolean equals (Object obj)
 
String getCode ()
 
int getOccurrences ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static BulkFixDetail fromJson (JsonObject jsonObject)
 
static List< BulkFixDetailfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final BulkFixDetail[] EMPTY_ARRAY = new BulkFixDetail[0]
 
static final List< BulkFixDetailEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A description of a fix applied to a library.

@coverage dart.server.generated.types

Definition at line 32 of file BulkFixDetail.java.

Constructor & Destructor Documentation

◆ BulkFixDetail()

org.dartlang.analysis.server.protocol.BulkFixDetail.BulkFixDetail ( String  code,
int  occurrences 
)
inline

Constructor for BulkFixDetail.

Definition at line 51 of file BulkFixDetail.java.

51 {
52 this.code = code;
53 this.occurrences = occurrences;
54 }

Member Function Documentation

◆ equals()

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

Definition at line 57 of file BulkFixDetail.java.

57 {
58 if (obj instanceof BulkFixDetail) {
59 BulkFixDetail other = (BulkFixDetail) obj;
60 return
61 ObjectUtilities.equals(other.code, code) &&
62 other.occurrences == occurrences;
63 }
64 return false;
65 }

◆ fromJson()

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

Definition at line 67 of file BulkFixDetail.java.

67 {
68 String code = jsonObject.get("code").getAsString();
69 int occurrences = jsonObject.get("occurrences").getAsInt();
70 return new BulkFixDetail(code, occurrences);
71 }

◆ fromJsonArray()

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

Definition at line 73 of file BulkFixDetail.java.

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

◆ getCode()

String org.dartlang.analysis.server.protocol.BulkFixDetail.getCode ( )
inline

The code of the diagnostic associated with the fix.

Definition at line 88 of file BulkFixDetail.java.

88 {
89 return code;
90 }

◆ getOccurrences()

int org.dartlang.analysis.server.protocol.BulkFixDetail.getOccurrences ( )
inline

The number times the associated diagnostic was fixed in the associated source edit.

Definition at line 95 of file BulkFixDetail.java.

95 {
96 return occurrences;
97 }

◆ hashCode()

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

Definition at line 100 of file BulkFixDetail.java.

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

◆ toJson()

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

Definition at line 107 of file BulkFixDetail.java.

107 {
108 JsonObject jsonObject = new JsonObject();
109 jsonObject.addProperty("code", code);
110 jsonObject.addProperty("occurrences", occurrences);
111 return jsonObject;
112 }

◆ toString()

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

Definition at line 115 of file BulkFixDetail.java.

115 {
116 StringBuilder builder = new StringBuilder();
117 builder.append("[");
118 builder.append("code=");
119 builder.append(code + ", ");
120 builder.append("occurrences=");
121 builder.append(occurrences);
122 builder.append("]");
123 return builder.toString();
124 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file BulkFixDetail.java.

◆ EMPTY_LIST

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

Definition at line 36 of file BulkFixDetail.java.


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