Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
org.dartlang.analysis.server.protocol.RenameFeedback Class Reference
Inheritance diagram for org.dartlang.analysis.server.protocol.RenameFeedback:
org.dartlang.analysis.server.protocol.RefactoringFeedback

Public Member Functions

 RenameFeedback (int offset, int length, String elementKindName, String oldName)
 
boolean equals (Object obj)
 
String getElementKindName ()
 
int getLength ()
 
int getOffset ()
 
String getOldName ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 
- Public Member Functions inherited from org.dartlang.analysis.server.protocol.RefactoringFeedback
 RefactoringFeedback ()
 
boolean equals (Object obj)
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static RenameFeedback fromJson (JsonObject jsonObject)
 
static List< RenameFeedbackfromJsonArray (JsonArray jsonArray)
 
static RefactoringFeedback fromJson (JsonObject jsonObject)
 

Static Public Attributes

static final RenameFeedback[] EMPTY_ARRAY = new RenameFeedback[0]
 
static final List< RenameFeedbackEMPTY_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 RenameFeedback.java.

Constructor & Destructor Documentation

◆ RenameFeedback()

org.dartlang.analysis.server.protocol.RenameFeedback.RenameFeedback ( int  offset,
int  length,
String  elementKindName,
String  oldName 
)
inline

Constructor for RenameFeedback.

Definition at line 61 of file RenameFeedback.java.

61 {
62 this.offset = offset;
63 this.length = length;
64 this.elementKindName = elementKindName;
65 this.oldName = oldName;
66 }

Member Function Documentation

◆ equals()

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

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

Definition at line 69 of file RenameFeedback.java.

69 {
70 if (obj instanceof RenameFeedback) {
71 RenameFeedback other = (RenameFeedback) obj;
72 return
73 other.offset == offset &&
74 other.length == length &&
75 ObjectUtilities.equals(other.elementKindName, elementKindName) &&
76 ObjectUtilities.equals(other.oldName, oldName);
77 }
78 return false;
79 }
RenameFeedback(int offset, int length, String elementKindName, String oldName)

◆ fromJson()

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

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

Definition at line 81 of file RenameFeedback.java.

81 {
82 int offset = jsonObject.get("offset").getAsInt();
83 int length = jsonObject.get("length").getAsInt();
84 String elementKindName = jsonObject.get("elementKindName").getAsString();
85 String oldName = jsonObject.get("oldName").getAsString();
86 return new RenameFeedback(offset, length, elementKindName, oldName);
87 }

◆ fromJsonArray()

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

Definition at line 89 of file RenameFeedback.java.

89 {
90 if (jsonArray == null) {
91 return EMPTY_LIST;
92 }
93 ArrayList<RenameFeedback> list = new ArrayList<RenameFeedback>(jsonArray.size());
94 Iterator<JsonElement> iterator = jsonArray.iterator();
95 while (iterator.hasNext()) {
96 list.add(fromJson(iterator.next().getAsJsonObject()));
97 }
98 return list;
99 }
static RenameFeedback fromJson(JsonObject jsonObject)
static final List< RenameFeedback > EMPTY_LIST

◆ getElementKindName()

String org.dartlang.analysis.server.protocol.RenameFeedback.getElementKindName ( )
inline

The human-readable description of the kind of element being renamed (such as "class" or "function type alias").

Definition at line 105 of file RenameFeedback.java.

105 {
106 return elementKindName;
107 }

◆ getLength()

int org.dartlang.analysis.server.protocol.RenameFeedback.getLength ( )
inline

The length of the name selected to be renamed.

Definition at line 112 of file RenameFeedback.java.

112 {
113 return length;
114 }

◆ getOffset()

int org.dartlang.analysis.server.protocol.RenameFeedback.getOffset ( )
inline

The offset to the beginning of the name selected to be renamed, or -1 if the name does not exist yet.

Definition at line 120 of file RenameFeedback.java.

120 {
121 return offset;
122 }

◆ getOldName()

String org.dartlang.analysis.server.protocol.RenameFeedback.getOldName ( )
inline

The old name of the element before the refactoring.

Definition at line 127 of file RenameFeedback.java.

127 {
128 return oldName;
129 }

◆ hashCode()

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

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

Definition at line 132 of file RenameFeedback.java.

132 {
133 HashCodeBuilder builder = new HashCodeBuilder();
134 builder.append(offset);
135 builder.append(length);
136 builder.append(elementKindName);
137 builder.append(oldName);
138 return builder.toHashCode();
139 }

◆ toJson()

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

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

Definition at line 141 of file RenameFeedback.java.

141 {
142 JsonObject jsonObject = new JsonObject();
143 jsonObject.addProperty("offset", offset);
144 jsonObject.addProperty("length", length);
145 jsonObject.addProperty("elementKindName", elementKindName);
146 jsonObject.addProperty("oldName", oldName);
147 return jsonObject;
148 }

◆ toString()

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

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

Definition at line 151 of file RenameFeedback.java.

151 {
152 StringBuilder builder = new StringBuilder();
153 builder.append("[");
154 builder.append("offset=");
155 builder.append(offset + ", ");
156 builder.append("length=");
157 builder.append(length + ", ");
158 builder.append("elementKindName=");
159 builder.append(elementKindName + ", ");
160 builder.append("oldName=");
161 builder.append(oldName);
162 builder.append("]");
163 return builder.toString();
164 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 32 of file RenameFeedback.java.

◆ EMPTY_LIST

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

Definition at line 34 of file RenameFeedback.java.


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