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.RefactoringMethodParameter Class Reference

Public Member Functions

 RefactoringMethodParameter (String id, String kind, String type, String name, String parameters)
 
boolean equals (Object obj)
 
String getId ()
 
String getKind ()
 
String getName ()
 
String getParameters ()
 
String getType ()
 
int hashCode ()
 
void setId (String id)
 
void setKind (String kind)
 
void setName (String name)
 
void setParameters (String parameters)
 
void setType (String type)
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static RefactoringMethodParameter fromJson (JsonObject jsonObject)
 
static List< RefactoringMethodParameterfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final RefactoringMethodParameter[] EMPTY_ARRAY = new RefactoringMethodParameter[0]
 
static final List< RefactoringMethodParameterEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A description of a parameter in a method refactoring.

@coverage dart.server.generated.types

Definition at line 32 of file RefactoringMethodParameter.java.

Constructor & Destructor Documentation

◆ RefactoringMethodParameter()

org.dartlang.analysis.server.protocol.RefactoringMethodParameter.RefactoringMethodParameter ( String  id,
String  kind,
String  type,
String  name,
String  parameters 
)
inline

Constructor for RefactoringMethodParameter.

Definition at line 70 of file RefactoringMethodParameter.java.

70 {
71 this.id = id;
72 this.kind = kind;
73 this.type = type;
74 this.name = name;
75 this.parameters = parameters;
76 }

Member Function Documentation

◆ equals()

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

Definition at line 79 of file RefactoringMethodParameter.java.

79 {
80 if (obj instanceof RefactoringMethodParameter) {
81 RefactoringMethodParameter other = (RefactoringMethodParameter) obj;
82 return
83 ObjectUtilities.equals(other.id, id) &&
84 ObjectUtilities.equals(other.kind, kind) &&
85 ObjectUtilities.equals(other.type, type) &&
86 ObjectUtilities.equals(other.name, name) &&
87 ObjectUtilities.equals(other.parameters, parameters);
88 }
89 return false;
90 }

◆ fromJson()

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

Definition at line 92 of file RefactoringMethodParameter.java.

92 {
93 String id = jsonObject.get("id") == null ? null : jsonObject.get("id").getAsString();
94 String kind = jsonObject.get("kind").getAsString();
95 String type = jsonObject.get("type").getAsString();
96 String name = jsonObject.get("name").getAsString();
97 String parameters = jsonObject.get("parameters") == null ? null : jsonObject.get("parameters").getAsString();
98 return new RefactoringMethodParameter(id, kind, type, name, parameters);
99 }
RefactoringMethodParameter(String id, String kind, String type, String name, String parameters)

◆ fromJsonArray()

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

Definition at line 101 of file RefactoringMethodParameter.java.

101 {
102 if (jsonArray == null) {
103 return EMPTY_LIST;
104 }
105 ArrayList<RefactoringMethodParameter> list = new ArrayList<RefactoringMethodParameter>(jsonArray.size());
106 Iterator<JsonElement> iterator = jsonArray.iterator();
107 while (iterator.hasNext()) {
108 list.add(fromJson(iterator.next().getAsJsonObject()));
109 }
110 return list;
111 }
static RefactoringMethodParameter fromJson(JsonObject jsonObject)

◆ getId()

String org.dartlang.analysis.server.protocol.RefactoringMethodParameter.getId ( )
inline

The unique identifier of the parameter. Clients may omit this field for the parameters they want to add.

Definition at line 117 of file RefactoringMethodParameter.java.

117 {
118 return id;
119 }

◆ getKind()

String org.dartlang.analysis.server.protocol.RefactoringMethodParameter.getKind ( )
inline

The kind of the parameter.

Definition at line 124 of file RefactoringMethodParameter.java.

124 {
125 return kind;
126 }

◆ getName()

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

The name that should be given to the parameter.

Definition at line 131 of file RefactoringMethodParameter.java.

131 {
132 return name;
133 }

◆ getParameters()

String org.dartlang.analysis.server.protocol.RefactoringMethodParameter.getParameters ( )
inline

The parameter list of the parameter's function type. If the parameter is not of a function type, this field will not be defined. If the function type has zero parameters, this field will have a value of '()'.

Definition at line 140 of file RefactoringMethodParameter.java.

140 {
141 return parameters;
142 }

◆ getType()

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

The type that should be given to the parameter, or the return type of the parameter's function type.

Definition at line 148 of file RefactoringMethodParameter.java.

148 {
149 return type;
150 }

◆ hashCode()

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

Definition at line 153 of file RefactoringMethodParameter.java.

153 {
154 HashCodeBuilder builder = new HashCodeBuilder();
155 builder.append(id);
156 builder.append(kind);
157 builder.append(type);
158 builder.append(name);
159 builder.append(parameters);
160 return builder.toHashCode();
161 }

◆ setId()

void org.dartlang.analysis.server.protocol.RefactoringMethodParameter.setId ( String  id)
inline

The unique identifier of the parameter. Clients may omit this field for the parameters they want to add.

Definition at line 167 of file RefactoringMethodParameter.java.

167 {
168 this.id = id;
169 }

◆ setKind()

void org.dartlang.analysis.server.protocol.RefactoringMethodParameter.setKind ( String  kind)
inline

The kind of the parameter.

Definition at line 174 of file RefactoringMethodParameter.java.

174 {
175 this.kind = kind;
176 }

◆ setName()

void org.dartlang.analysis.server.protocol.RefactoringMethodParameter.setName ( String  name)
inline

The name that should be given to the parameter.

Definition at line 181 of file RefactoringMethodParameter.java.

181 {
182 this.name = name;
183 }

◆ setParameters()

void org.dartlang.analysis.server.protocol.RefactoringMethodParameter.setParameters ( String  parameters)
inline

The parameter list of the parameter's function type. If the parameter is not of a function type, this field will not be defined. If the function type has zero parameters, this field will have a value of '()'.

Definition at line 190 of file RefactoringMethodParameter.java.

190 {
191 this.parameters = parameters;
192 }

◆ setType()

void org.dartlang.analysis.server.protocol.RefactoringMethodParameter.setType ( String  type)
inline

The type that should be given to the parameter, or the return type of the parameter's function type.

Definition at line 198 of file RefactoringMethodParameter.java.

198 {
199 this.type = type;
200 }

◆ toJson()

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

Definition at line 202 of file RefactoringMethodParameter.java.

202 {
203 JsonObject jsonObject = new JsonObject();
204 if (id != null) {
205 jsonObject.addProperty("id", id);
206 }
207 jsonObject.addProperty("kind", kind);
208 jsonObject.addProperty("type", type);
209 jsonObject.addProperty("name", name);
210 if (parameters != null) {
211 jsonObject.addProperty("parameters", parameters);
212 }
213 return jsonObject;
214 }

◆ toString()

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

Definition at line 217 of file RefactoringMethodParameter.java.

217 {
218 StringBuilder builder = new StringBuilder();
219 builder.append("[");
220 builder.append("id=");
221 builder.append(id + ", ");
222 builder.append("kind=");
223 builder.append(kind + ", ");
224 builder.append("type=");
225 builder.append(type + ", ");
226 builder.append("name=");
227 builder.append(name + ", ");
228 builder.append("parameters=");
229 builder.append(parameters);
230 builder.append("]");
231 return builder.toString();
232 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file RefactoringMethodParameter.java.

◆ EMPTY_LIST

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

Definition at line 36 of file RefactoringMethodParameter.java.


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