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

Public Member Functions

 ServerLogEntry (int time, String kind, String data)
 
boolean equals (Object obj)
 
String getData ()
 
String getKind ()
 
int getTime ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static ServerLogEntry fromJson (JsonObject jsonObject)
 
static List< ServerLogEntryfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final ServerLogEntry[] EMPTY_ARRAY = new ServerLogEntry[0]
 
static final List< ServerLogEntryEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A log entry from the server.

@coverage dart.server.generated.types

Definition at line 32 of file ServerLogEntry.java.

Constructor & Destructor Documentation

◆ ServerLogEntry()

org.dartlang.analysis.server.protocol.ServerLogEntry.ServerLogEntry ( int  time,
String  kind,
String  data 
)
inline

Constructor for ServerLogEntry.

Definition at line 56 of file ServerLogEntry.java.

56 {
57 this.time = time;
58 this.kind = kind;
59 this.data = data;
60 }

Member Function Documentation

◆ equals()

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

Definition at line 63 of file ServerLogEntry.java.

63 {
64 if (obj instanceof ServerLogEntry) {
65 ServerLogEntry other = (ServerLogEntry) obj;
66 return
67 other.time == time &&
68 ObjectUtilities.equals(other.kind, kind) &&
69 ObjectUtilities.equals(other.data, data);
70 }
71 return false;
72 }

◆ fromJson()

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

Definition at line 74 of file ServerLogEntry.java.

74 {
75 int time = jsonObject.get("time").getAsInt();
76 String kind = jsonObject.get("kind").getAsString();
77 String data = jsonObject.get("data").getAsString();
78 return new ServerLogEntry(time, kind, data);
79 }
ServerLogEntry(int time, String kind, String data)

◆ fromJsonArray()

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

Definition at line 81 of file ServerLogEntry.java.

81 {
82 if (jsonArray == null) {
83 return EMPTY_LIST;
84 }
85 ArrayList<ServerLogEntry> list = new ArrayList<ServerLogEntry>(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< ServerLogEntry > EMPTY_LIST
static ServerLogEntry fromJson(JsonObject jsonObject)

◆ getData()

String org.dartlang.analysis.server.protocol.ServerLogEntry.getData ( )
inline

The payload of the entry, the actual format is determined by the "kind" field.

Definition at line 96 of file ServerLogEntry.java.

96 {
97 return data;
98 }

◆ getKind()

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

The kind of the entry, used to determine how to interpret the "data" field.

Definition at line 103 of file ServerLogEntry.java.

103 {
104 return kind;
105 }

◆ getTime()

int org.dartlang.analysis.server.protocol.ServerLogEntry.getTime ( )
inline

The time (milliseconds since epoch) at which the server created this log entry.

Definition at line 110 of file ServerLogEntry.java.

110 {
111 return time;
112 }

◆ hashCode()

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

Definition at line 115 of file ServerLogEntry.java.

115 {
116 HashCodeBuilder builder = new HashCodeBuilder();
117 builder.append(time);
118 builder.append(kind);
119 builder.append(data);
120 return builder.toHashCode();
121 }

◆ toJson()

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

Definition at line 123 of file ServerLogEntry.java.

123 {
124 JsonObject jsonObject = new JsonObject();
125 jsonObject.addProperty("time", time);
126 jsonObject.addProperty("kind", kind);
127 jsonObject.addProperty("data", data);
128 return jsonObject;
129 }

◆ toString()

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

Definition at line 132 of file ServerLogEntry.java.

132 {
133 StringBuilder builder = new StringBuilder();
134 builder.append("[");
135 builder.append("time=");
136 builder.append(time + ", ");
137 builder.append("kind=");
138 builder.append(kind + ", ");
139 builder.append("data=");
140 builder.append(data);
141 builder.append("]");
142 return builder.toString();
143 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file ServerLogEntry.java.

◆ EMPTY_LIST

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

Definition at line 36 of file ServerLogEntry.java.


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