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.InlineLocalVariableFeedback Class Reference
Inheritance diagram for org.dartlang.analysis.server.protocol.InlineLocalVariableFeedback:
org.dartlang.analysis.server.protocol.RefactoringFeedback

Public Member Functions

 InlineLocalVariableFeedback (String name, int occurrences)
 
boolean equals (Object obj)
 
String getName ()
 
int getOccurrences ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 
- Public Member Functions inherited from org.dartlang.analysis.server.protocol.RefactoringFeedback
 RefactoringFeedback ()
 

Static Public Member Functions

static InlineLocalVariableFeedback fromJson (JsonObject jsonObject)
 
static List< InlineLocalVariableFeedbackfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final InlineLocalVariableFeedback[] EMPTY_ARRAY = new InlineLocalVariableFeedback[0]
 
static final List< InlineLocalVariableFeedbackEMPTY_LIST = Lists.newArrayList()
 
- Static Public Attributes inherited from org.dartlang.analysis.server.protocol.RefactoringFeedback
static final RefactoringFeedback[] EMPTY_ARRAY = new RefactoringFeedback[0]
 
static final List< RefactoringFeedbackEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

@coverage dart.server.generated.types

Definition at line 30 of file InlineLocalVariableFeedback.java.

Constructor & Destructor Documentation

◆ InlineLocalVariableFeedback()

org.dartlang.analysis.server.protocol.InlineLocalVariableFeedback.InlineLocalVariableFeedback ( String  name,
int  occurrences 
)
inline

Constructor for InlineLocalVariableFeedback.

Definition at line 49 of file InlineLocalVariableFeedback.java.

49 {
50 this.name = name;
51 this.occurrences = occurrences;
52 }

Member Function Documentation

◆ equals()

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

Reimplemented from org.dartlang.analysis.server.protocol.RefactoringFeedback.

Definition at line 55 of file InlineLocalVariableFeedback.java.

55 {
56 if (obj instanceof InlineLocalVariableFeedback) {
57 InlineLocalVariableFeedback other = (InlineLocalVariableFeedback) obj;
58 return
59 ObjectUtilities.equals(other.name, name) &&
60 other.occurrences == occurrences;
61 }
62 return false;
63 }

◆ fromJson()

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

Reimplemented from org.dartlang.analysis.server.protocol.RefactoringFeedback.

Definition at line 65 of file InlineLocalVariableFeedback.java.

65 {
66 String name = jsonObject.get("name").getAsString();
67 int occurrences = jsonObject.get("occurrences").getAsInt();
68 return new InlineLocalVariableFeedback(name, occurrences);
69 }

◆ fromJsonArray()

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

Definition at line 71 of file InlineLocalVariableFeedback.java.

71 {
72 if (jsonArray == null) {
73 return EMPTY_LIST;
74 }
75 ArrayList<InlineLocalVariableFeedback> list = new ArrayList<InlineLocalVariableFeedback>(jsonArray.size());
76 Iterator<JsonElement> iterator = jsonArray.iterator();
77 while (iterator.hasNext()) {
78 list.add(fromJson(iterator.next().getAsJsonObject()));
79 }
80 return list;
81 }
static InlineLocalVariableFeedback fromJson(JsonObject jsonObject)

◆ getName()

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

The name of the variable being inlined.

Definition at line 86 of file InlineLocalVariableFeedback.java.

86 {
87 return name;
88 }

◆ getOccurrences()

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

The number of times the variable occurs.

Definition at line 93 of file InlineLocalVariableFeedback.java.

93 {
94 return occurrences;
95 }

◆ hashCode()

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

Reimplemented from org.dartlang.analysis.server.protocol.RefactoringFeedback.

Definition at line 98 of file InlineLocalVariableFeedback.java.

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

◆ toJson()

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

Reimplemented from org.dartlang.analysis.server.protocol.RefactoringFeedback.

Definition at line 105 of file InlineLocalVariableFeedback.java.

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

◆ toString()

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

Reimplemented from org.dartlang.analysis.server.protocol.RefactoringFeedback.

Definition at line 113 of file InlineLocalVariableFeedback.java.

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

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 32 of file InlineLocalVariableFeedback.java.

◆ EMPTY_LIST

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

Definition at line 34 of file InlineLocalVariableFeedback.java.


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