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

Public Member Functions

 PostfixTemplateDescriptor (String name, String key, String example)
 
boolean equals (Object obj)
 
String getExample ()
 
String getKey ()
 
String getName ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static PostfixTemplateDescriptor fromJson (JsonObject jsonObject)
 
static List< PostfixTemplateDescriptorfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final PostfixTemplateDescriptor[] EMPTY_ARRAY = new PostfixTemplateDescriptor[0]
 
static final List< PostfixTemplateDescriptorEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

The description of a postfix completion template.

@coverage dart.server.generated.types

Definition at line 32 of file PostfixTemplateDescriptor.java.

Constructor & Destructor Documentation

◆ PostfixTemplateDescriptor()

org.dartlang.analysis.server.protocol.PostfixTemplateDescriptor.PostfixTemplateDescriptor ( String  name,
String  key,
String  example 
)
inline

Constructor for PostfixTemplateDescriptor.

Definition at line 56 of file PostfixTemplateDescriptor.java.

56 {
57 this.name = name;
58 this.key = key;
59 this.example = example;
60 }

Member Function Documentation

◆ equals()

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

Definition at line 63 of file PostfixTemplateDescriptor.java.

63 {
64 if (obj instanceof PostfixTemplateDescriptor) {
65 PostfixTemplateDescriptor other = (PostfixTemplateDescriptor) obj;
66 return
67 ObjectUtilities.equals(other.name, name) &&
68 ObjectUtilities.equals(other.key, key) &&
69 ObjectUtilities.equals(other.example, example);
70 }
71 return false;
72 }

◆ fromJson()

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

Definition at line 74 of file PostfixTemplateDescriptor.java.

74 {
75 String name = jsonObject.get("name").getAsString();
76 String key = jsonObject.get("key").getAsString();
77 String example = jsonObject.get("example").getAsString();
78 return new PostfixTemplateDescriptor(name, key, example);
79 }

◆ fromJsonArray()

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

Definition at line 81 of file PostfixTemplateDescriptor.java.

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

◆ getExample()

String org.dartlang.analysis.server.protocol.PostfixTemplateDescriptor.getExample ( )
inline

A short example of the transformation performed when the template is applied.

Definition at line 96 of file PostfixTemplateDescriptor.java.

96 {
97 return example;
98 }

◆ getKey()

String org.dartlang.analysis.server.protocol.PostfixTemplateDescriptor.getKey ( )
inline

The unique template key, not shown in the UI.

Definition at line 103 of file PostfixTemplateDescriptor.java.

103 {
104 return key;
105 }

◆ getName()

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

The template name, shown in the UI.

Definition at line 110 of file PostfixTemplateDescriptor.java.

110 {
111 return name;
112 }

◆ hashCode()

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

Definition at line 115 of file PostfixTemplateDescriptor.java.

115 {
116 HashCodeBuilder builder = new HashCodeBuilder();
117 builder.append(name);
118 builder.append(key);
119 builder.append(example);
120 return builder.toHashCode();
121 }

◆ toJson()

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

Definition at line 123 of file PostfixTemplateDescriptor.java.

123 {
124 JsonObject jsonObject = new JsonObject();
125 jsonObject.addProperty("name", name);
126 jsonObject.addProperty("key", key);
127 jsonObject.addProperty("example", example);
128 return jsonObject;
129 }

◆ toString()

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

Definition at line 132 of file PostfixTemplateDescriptor.java.

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

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 34 of file PostfixTemplateDescriptor.java.

◆ EMPTY_LIST

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

Definition at line 36 of file PostfixTemplateDescriptor.java.


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