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

Public Member Functions

 ParameterInfo (String kind, String name, String type, String defaultValue)
 
boolean equals (Object obj)
 
String getDefaultValue ()
 
String getKind ()
 
String getName ()
 
String getType ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static ParameterInfo fromJson (JsonObject jsonObject)
 
static List< ParameterInfofromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final ParameterInfo[] EMPTY_ARRAY = new ParameterInfo[0]
 
static final List< ParameterInfoEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A description of a member that is being overridden.

@coverage dart.server.generated.types

Definition at line 32 of file ParameterInfo.java.

Constructor & Destructor Documentation

◆ ParameterInfo()

org.dartlang.analysis.server.protocol.ParameterInfo.ParameterInfo ( String  kind,
String  name,
String  type,
String  defaultValue 
)
inline

Constructor for ParameterInfo.

Definition at line 62 of file ParameterInfo.java.

62 {
63 this.kind = kind;
64 this.name = name;
65 this.type = type;
66 this.defaultValue = defaultValue;
67 }

Member Function Documentation

◆ equals()

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

Definition at line 70 of file ParameterInfo.java.

70 {
71 if (obj instanceof ParameterInfo) {
72 ParameterInfo other = (ParameterInfo) obj;
73 return
74 ObjectUtilities.equals(other.kind, kind) &&
75 ObjectUtilities.equals(other.name, name) &&
76 ObjectUtilities.equals(other.type, type) &&
77 ObjectUtilities.equals(other.defaultValue, defaultValue);
78 }
79 return false;
80 }
ParameterInfo(String kind, String name, String type, String defaultValue)

◆ fromJson()

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

Definition at line 82 of file ParameterInfo.java.

82 {
83 String kind = jsonObject.get("kind").getAsString();
84 String name = jsonObject.get("name").getAsString();
85 String type = jsonObject.get("type").getAsString();
86 String defaultValue = jsonObject.get("defaultValue") == null ? null : jsonObject.get("defaultValue").getAsString();
87 return new ParameterInfo(kind, name, type, defaultValue);
88 }

◆ fromJsonArray()

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

Definition at line 90 of file ParameterInfo.java.

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

◆ getDefaultValue()

String org.dartlang.analysis.server.protocol.ParameterInfo.getDefaultValue ( )
inline

The default value for this parameter. This value will be omitted if the parameter does not have a default value.

Definition at line 106 of file ParameterInfo.java.

106 {
107 return defaultValue;
108 }

◆ getKind()

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

The kind of the parameter.

Definition at line 113 of file ParameterInfo.java.

113 {
114 return kind;
115 }

◆ getName()

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

The name of the parameter.

Definition at line 120 of file ParameterInfo.java.

120 {
121 return name;
122 }

◆ getType()

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

The type of the parameter.

Definition at line 127 of file ParameterInfo.java.

127 {
128 return type;
129 }

◆ hashCode()

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

Definition at line 132 of file ParameterInfo.java.

132 {
133 HashCodeBuilder builder = new HashCodeBuilder();
134 builder.append(kind);
135 builder.append(name);
136 builder.append(type);
137 builder.append(defaultValue);
138 return builder.toHashCode();
139 }

◆ toJson()

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

Definition at line 141 of file ParameterInfo.java.

141 {
142 JsonObject jsonObject = new JsonObject();
143 jsonObject.addProperty("kind", kind);
144 jsonObject.addProperty("name", name);
145 jsonObject.addProperty("type", type);
146 if (defaultValue != null) {
147 jsonObject.addProperty("defaultValue", defaultValue);
148 }
149 return jsonObject;
150 }

◆ toString()

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

Definition at line 153 of file ParameterInfo.java.

153 {
154 StringBuilder builder = new StringBuilder();
155 builder.append("[");
156 builder.append("kind=");
157 builder.append(kind + ", ");
158 builder.append("name=");
159 builder.append(name + ", ");
160 builder.append("type=");
161 builder.append(type + ", ");
162 builder.append("defaultValue=");
163 builder.append(defaultValue);
164 builder.append("]");
165 return builder.toString();
166 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file ParameterInfo.java.

◆ EMPTY_LIST

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

Definition at line 36 of file ParameterInfo.java.


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