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

Public Member Functions

 MessageAction (String label)
 
boolean equals (Object obj)
 
String getLabel ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static MessageAction fromJson (JsonObject jsonObject)
 
static List< MessageActionfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final MessageAction[] EMPTY_ARRAY = new MessageAction[0]
 
static final List< MessageActionEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

An action associated with a message that the server is requesting the client to display to the user.

@coverage dart.server.generated.types

Definition at line 33 of file MessageAction.java.

Constructor & Destructor Documentation

◆ MessageAction()

org.dartlang.analysis.server.protocol.MessageAction.MessageAction ( String  label)
inline

Constructor for MessageAction.

Definition at line 48 of file MessageAction.java.

48 {
49 this.label = label;
50 }

Member Function Documentation

◆ equals()

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

Definition at line 53 of file MessageAction.java.

53 {
54 if (obj instanceof MessageAction) {
55 MessageAction other = (MessageAction) obj;
56 return
57 ObjectUtilities.equals(other.label, label);
58 }
59 return false;
60 }

◆ fromJson()

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

Definition at line 62 of file MessageAction.java.

62 {
63 String label = jsonObject.get("label").getAsString();
64 return new MessageAction(label);
65 }

◆ fromJsonArray()

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

Definition at line 67 of file MessageAction.java.

67 {
68 if (jsonArray == null) {
69 return EMPTY_LIST;
70 }
71 ArrayList<MessageAction> list = new ArrayList<MessageAction>(jsonArray.size());
72 Iterator<JsonElement> iterator = jsonArray.iterator();
73 while (iterator.hasNext()) {
74 list.add(fromJson(iterator.next().getAsJsonObject()));
75 }
76 return list;
77 }
static final List< MessageAction > EMPTY_LIST
static MessageAction fromJson(JsonObject jsonObject)

◆ getLabel()

String org.dartlang.analysis.server.protocol.MessageAction.getLabel ( )
inline

The label of the button to be displayed, and the value to be returned to the server if the button is clicked.

Definition at line 83 of file MessageAction.java.

83 {
84 return label;
85 }

◆ hashCode()

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

Definition at line 88 of file MessageAction.java.

88 {
89 HashCodeBuilder builder = new HashCodeBuilder();
90 builder.append(label);
91 return builder.toHashCode();
92 }

◆ toJson()

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

Definition at line 94 of file MessageAction.java.

94 {
95 JsonObject jsonObject = new JsonObject();
96 jsonObject.addProperty("label", label);
97 return jsonObject;
98 }

◆ toString()

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

Definition at line 101 of file MessageAction.java.

101 {
102 StringBuilder builder = new StringBuilder();
103 builder.append("[");
104 builder.append("label=");
105 builder.append(label);
106 builder.append("]");
107 return builder.toString();
108 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 35 of file MessageAction.java.

◆ EMPTY_LIST

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

Definition at line 37 of file MessageAction.java.


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