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

Public Member Functions

 RequestError (String code, String message, String stackTrace)
 
boolean equals (Object obj)
 
String getCode ()
 
String getMessage ()
 
String getStackTrace ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static RequestError fromJson (JsonObject jsonObject)
 
static List< RequestErrorfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final RequestError[] EMPTY_ARRAY = new RequestError[0]
 
static final List< RequestErrorEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

An indication of a problem with the execution of the server, typically in response to a request.

@coverage dart.server.generated.types

Definition at line 32 of file RequestError.java.

Constructor & Destructor Documentation

◆ RequestError()

org.dartlang.analysis.server.protocol.RequestError.RequestError ( String  code,
String  message,
String  stackTrace 
)
inline

Constructor for RequestError.

Definition at line 56 of file RequestError.java.

56 {
57 this.code = code;
58 this.message = message;
59 this.stackTrace = stackTrace;
60 }

Member Function Documentation

◆ equals()

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

Definition at line 63 of file RequestError.java.

63 {
64 if (obj instanceof RequestError) {
65 RequestError other = (RequestError) obj;
66 return
67 ObjectUtilities.equals(other.code, code) &&
68 ObjectUtilities.equals(other.message, message) &&
69 ObjectUtilities.equals(other.stackTrace, stackTrace);
70 }
71 return false;
72 }

◆ fromJson()

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

Definition at line 74 of file RequestError.java.

74 {
75 String code = jsonObject.get("code").getAsString();
76 String message = jsonObject.get("message").getAsString();
77 String stackTrace = jsonObject.get("stackTrace") == null ? null : jsonObject.get("stackTrace").getAsString();
78 return new RequestError(code, message, stackTrace);
79 }
RequestError(String code, String message, String stackTrace)

◆ fromJsonArray()

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

Definition at line 81 of file RequestError.java.

81 {
82 if (jsonArray == null) {
83 return EMPTY_LIST;
84 }
85 ArrayList<RequestError> list = new ArrayList<RequestError>(jsonArray.size());
86 Iterator<JsonElement> iterator = jsonArray.iterator();
87 while (iterator.hasNext()) {
88 list.add(fromJson(iterator.next().getAsJsonObject()));
89 }
90 return list;
91 }
static final List< RequestError > EMPTY_LIST
static RequestError fromJson(JsonObject jsonObject)

◆ getCode()

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

A code that uniquely identifies the error that occurred.

Definition at line 96 of file RequestError.java.

96 {
97 return code;
98 }

◆ getMessage()

String org.dartlang.analysis.server.protocol.RequestError.getMessage ( )
inline

A short description of the error.

Definition at line 103 of file RequestError.java.

103 {
104 return message;
105 }

◆ getStackTrace()

String org.dartlang.analysis.server.protocol.RequestError.getStackTrace ( )
inline

The stack trace associated with processing the request, used for debugging the server.

Definition at line 110 of file RequestError.java.

110 {
111 return stackTrace;
112 }

◆ hashCode()

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

Definition at line 115 of file RequestError.java.

115 {
116 HashCodeBuilder builder = new HashCodeBuilder();
117 builder.append(code);
118 builder.append(message);
119 builder.append(stackTrace);
120 return builder.toHashCode();
121 }

◆ toJson()

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

Definition at line 123 of file RequestError.java.

123 {
124 JsonObject jsonObject = new JsonObject();
125 jsonObject.addProperty("code", code);
126 jsonObject.addProperty("message", message);
127 if (stackTrace != null) {
128 jsonObject.addProperty("stackTrace", stackTrace);
129 }
130 return jsonObject;
131 }

◆ toString()

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

Definition at line 134 of file RequestError.java.

134 {
135 StringBuilder builder = new StringBuilder();
136 builder.append("[");
137 builder.append("code=");
138 builder.append(code + ", ");
139 builder.append("message=");
140 builder.append(message + ", ");
141 builder.append("stackTrace=");
142 builder.append(stackTrace);
143 builder.append("]");
144 return builder.toString();
145 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file RequestError.java.

◆ EMPTY_LIST

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

Definition at line 36 of file RequestError.java.


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