Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: pkg/analysis_server/lib/src/protocol.dart

Issue 309483006: Change RequestDatum "is" functions into getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/protocol.dart
diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
index 9aa9bde22e001f27123e3fba9ba1bd790e73fc76..07f40085d2e5a8af8b0c4881b486d32edabb84ef 100644
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ b/pkg/analysis_server/lib/src/protocol.dart
@@ -298,7 +298,7 @@ class RequestDatum {
/**
* Determine if the datum is a list of strings.
*/
- bool isStringList() {
+ bool get isStringList {
if (datum is! List) {
return false;
}
@@ -314,7 +314,7 @@ class RequestDatum {
* Validate that the datum is a list of strings, and return it.
*/
List<String> asStringList() {
- if (!isStringList()) {
+ if (!isStringList) {
throw new RequestFailure(new Response.invalidParameter(request, path,
"be a list of strings"));
}
@@ -343,7 +343,7 @@ class RequestDatum {
* Note: we can safely assume that the keys are all strings, since JSON maps
* cannot have any other key type.
*/
- bool isStringMap() {
+ bool get isStringMap {
if (datum is! Map) {
return false;
}
@@ -359,7 +359,7 @@ class RequestDatum {
* Validate that the datum is a map from strings to strings, and return it.
*/
Map<String, String> asStringMap() {
- if (!isStringMap()) {
+ if (!isStringMap) {
throw new RequestFailure(new Response.invalidParameter(request, path,
"be a string map"));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698