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

Public Member Functions

 RefactoringProblem (String severity, String message, Location location)
 
boolean equals (Object obj)
 
Location getLocation ()
 
String getMessage ()
 
String getSeverity ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static RefactoringProblem fromJson (JsonObject jsonObject)
 
static List< RefactoringProblemfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final RefactoringProblem[] EMPTY_ARRAY = new RefactoringProblem[0]
 
static final List< RefactoringProblemEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A description of a problem related to a refactoring.

@coverage dart.server.generated.types

Definition at line 32 of file RefactoringProblem.java.

Constructor & Destructor Documentation

◆ RefactoringProblem()

org.dartlang.analysis.server.protocol.RefactoringProblem.RefactoringProblem ( String  severity,
String  message,
Location  location 
)
inline

Constructor for RefactoringProblem.

Definition at line 58 of file RefactoringProblem.java.

58 {
59 this.severity = severity;
60 this.message = message;
61 this.location = location;
62 }

Member Function Documentation

◆ equals()

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

Definition at line 65 of file RefactoringProblem.java.

65 {
66 if (obj instanceof RefactoringProblem) {
67 RefactoringProblem other = (RefactoringProblem) obj;
68 return
69 ObjectUtilities.equals(other.severity, severity) &&
70 ObjectUtilities.equals(other.message, message) &&
71 ObjectUtilities.equals(other.location, location);
72 }
73 return false;
74 }

◆ fromJson()

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

Definition at line 76 of file RefactoringProblem.java.

76 {
77 String severity = jsonObject.get("severity").getAsString();
78 String message = jsonObject.get("message").getAsString();
79 Location location = jsonObject.get("location") == null ? null : Location.fromJson(jsonObject.get("location").getAsJsonObject());
80 return new RefactoringProblem(severity, message, location);
81 }
RefactoringProblem(String severity, String message, Location location)

◆ fromJsonArray()

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

Definition at line 83 of file RefactoringProblem.java.

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

◆ getLocation()

Location org.dartlang.analysis.server.protocol.RefactoringProblem.getLocation ( )
inline

The location of the problem being represented. This field is omitted unless there is a specific location associated with the problem (such as a location where an element being renamed will be shadowed).

Definition at line 100 of file RefactoringProblem.java.

100 {
101 return location;
102 }

◆ getMessage()

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

A human-readable description of the problem being represented.

Definition at line 107 of file RefactoringProblem.java.

107 {
108 return message;
109 }

◆ getSeverity()

String org.dartlang.analysis.server.protocol.RefactoringProblem.getSeverity ( )
inline

The severity of the problem being represented.

Definition at line 114 of file RefactoringProblem.java.

114 {
115 return severity;
116 }

◆ hashCode()

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

Definition at line 119 of file RefactoringProblem.java.

119 {
120 HashCodeBuilder builder = new HashCodeBuilder();
121 builder.append(severity);
122 builder.append(message);
123 builder.append(location);
124 return builder.toHashCode();
125 }

◆ toJson()

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

Definition at line 127 of file RefactoringProblem.java.

127 {
128 JsonObject jsonObject = new JsonObject();
129 jsonObject.addProperty("severity", severity);
130 jsonObject.addProperty("message", message);
131 if (location != null) {
132 jsonObject.add("location", location.toJson());
133 }
134 return jsonObject;
135 }

◆ toString()

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

Definition at line 138 of file RefactoringProblem.java.

138 {
139 StringBuilder builder = new StringBuilder();
140 builder.append("[");
141 builder.append("severity=");
142 builder.append(severity + ", ");
143 builder.append("message=");
144 builder.append(message + ", ");
145 builder.append("location=");
146 builder.append(location);
147 builder.append("]");
148 return builder.toString();
149 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file RefactoringProblem.java.

◆ EMPTY_LIST

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

Definition at line 36 of file RefactoringProblem.java.


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