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

Public Member Functions

 LibraryPathSet (String scope, List< String > libraryPaths)
 
boolean equals (Object obj)
 
List< String > getLibraryPaths ()
 
String getScope ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static LibraryPathSet fromJson (JsonObject jsonObject)
 
static List< LibraryPathSetfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final LibraryPathSet[] EMPTY_ARRAY = new LibraryPathSet[0]
 
static final List< LibraryPathSetEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A list of associations between paths and the libraries that should be included for code completion when editing a file beneath that path.

@coverage dart.server.generated.types

Definition at line 33 of file LibraryPathSet.java.

Constructor & Destructor Documentation

◆ LibraryPathSet()

org.dartlang.analysis.server.protocol.LibraryPathSet.LibraryPathSet ( String  scope,
List< String >  libraryPaths 
)
inline

Constructor for LibraryPathSet.

Definition at line 54 of file LibraryPathSet.java.

54 {
55 this.scope = scope;
56 this.libraryPaths = libraryPaths;
57 }

Member Function Documentation

◆ equals()

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

Definition at line 60 of file LibraryPathSet.java.

60 {
61 if (obj instanceof LibraryPathSet) {
62 LibraryPathSet other = (LibraryPathSet) obj;
63 return
64 ObjectUtilities.equals(other.scope, scope) &&
65 ObjectUtilities.equals(other.libraryPaths, libraryPaths);
66 }
67 return false;
68 }
LibraryPathSet(String scope, List< String > libraryPaths)

◆ fromJson()

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

Definition at line 70 of file LibraryPathSet.java.

70 {
71 String scope = jsonObject.get("scope").getAsString();
72 List<String> libraryPaths = JsonUtilities.decodeStringList(jsonObject.get("libraryPaths").getAsJsonArray());
73 return new LibraryPathSet(scope, libraryPaths);
74 }

◆ fromJsonArray()

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

Definition at line 76 of file LibraryPathSet.java.

76 {
77 if (jsonArray == null) {
78 return EMPTY_LIST;
79 }
80 ArrayList<LibraryPathSet> list = new ArrayList<LibraryPathSet>(jsonArray.size());
81 Iterator<JsonElement> iterator = jsonArray.iterator();
82 while (iterator.hasNext()) {
83 list.add(fromJson(iterator.next().getAsJsonObject()));
84 }
85 return list;
86 }
static final List< LibraryPathSet > EMPTY_LIST
static LibraryPathSet fromJson(JsonObject jsonObject)

◆ getLibraryPaths()

List< String > org.dartlang.analysis.server.protocol.LibraryPathSet.getLibraryPaths ( )
inline

The paths of the libraries of interest to the client for completion suggestions.

Definition at line 91 of file LibraryPathSet.java.

91 {
92 return libraryPaths;
93 }

◆ getScope()

String org.dartlang.analysis.server.protocol.LibraryPathSet.getScope ( )
inline

The filepath for which this request's libraries should be active in completion suggestions. This object associates filesystem regions to libraries and library directories of interest to the client.

Definition at line 100 of file LibraryPathSet.java.

100 {
101 return scope;
102 }

◆ hashCode()

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

Definition at line 105 of file LibraryPathSet.java.

105 {
106 HashCodeBuilder builder = new HashCodeBuilder();
107 builder.append(scope);
108 builder.append(libraryPaths);
109 return builder.toHashCode();
110 }

◆ toJson()

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

Definition at line 112 of file LibraryPathSet.java.

112 {
113 JsonObject jsonObject = new JsonObject();
114 jsonObject.addProperty("scope", scope);
115 JsonArray jsonArrayLibraryPaths = new JsonArray();
116 for (String elt : libraryPaths) {
117 jsonArrayLibraryPaths.add(new JsonPrimitive(elt));
118 }
119 jsonObject.add("libraryPaths", jsonArrayLibraryPaths);
120 return jsonObject;
121 }

◆ toString()

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

Definition at line 124 of file LibraryPathSet.java.

124 {
125 StringBuilder builder = new StringBuilder();
126 builder.append("[");
127 builder.append("scope=");
128 builder.append(scope + ", ");
129 builder.append("libraryPaths=");
130 builder.append(StringUtils.join(libraryPaths, ", "));
131 builder.append("]");
132 return builder.toString();
133 }

Member Data Documentation

◆ EMPTY_ARRAY

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

Definition at line 35 of file LibraryPathSet.java.

◆ EMPTY_LIST

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

Definition at line 37 of file LibraryPathSet.java.


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