mirror of
https://github.com/dart-lang/sdk
synced 2024-09-04 16:03:44 +00:00
[pkg/vm_service] turn on a few more lints for this package
Change-Id: I8eef00c606e713e252db8834f730f1655cdd57a5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259509 Commit-Queue: Devon Carew <devoncarew@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
This commit is contained in:
parent
a3764263d8
commit
8e0f4f4191
|
@ -4,3 +4,6 @@ linter:
|
||||||
rules:
|
rules:
|
||||||
- directives_ordering
|
- directives_ordering
|
||||||
- prefer_generic_function_type_aliases
|
- prefer_generic_function_type_aliases
|
||||||
|
- prefer_initializing_formals
|
||||||
|
- prefer_single_quotes
|
||||||
|
- unnecessary_this
|
||||||
|
|
|
@ -7,7 +7,7 @@ import 'dart:developer' as developer;
|
||||||
void main(List<String> args) {
|
void main(List<String> args) {
|
||||||
String local1 = 'abcd';
|
String local1 = 'abcd';
|
||||||
int local2 = 2;
|
int local2 = 2;
|
||||||
var longList = [1, "hello", 3, 5, 7, 11, 13, 14, 15, 16, 17, 18, 19, 20];
|
var longList = [1, 'hello', 3, 5, 7, 11, 13, 14, 15, 16, 17, 18, 19, 20];
|
||||||
var deepList = [
|
var deepList = [
|
||||||
Bar(),
|
Bar(),
|
||||||
[
|
[
|
||||||
|
@ -17,7 +17,7 @@ void main(List<String> args) {
|
||||||
[7]
|
[7]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"end"
|
'end'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
@ -42,7 +42,7 @@ void foo(int val) {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Bar extends FooBar {
|
class Bar extends FooBar {
|
||||||
String field1 = "my string";
|
String field1 = 'my string';
|
||||||
}
|
}
|
||||||
|
|
||||||
class FooBar {
|
class FooBar {
|
||||||
|
|
|
@ -8,7 +8,7 @@ void main(List<String> args) {
|
||||||
if (true) local1 = 'abcd';
|
if (true) local1 = 'abcd';
|
||||||
|
|
||||||
int local2 = 2;
|
int local2 = 2;
|
||||||
var longList = [1, "hello", 3, 5, 7, 11, 13, 14, 15, 16, 17, 18, 19, 20];
|
var longList = [1, 'hello', 3, 5, 7, 11, 13, 14, 15, 16, 17, 18, 19, 20];
|
||||||
var deepList = [
|
var deepList = [
|
||||||
Bar(),
|
Bar(),
|
||||||
[
|
[
|
||||||
|
@ -18,7 +18,7 @@ void main(List<String> args) {
|
||||||
[7]
|
[7]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"end"
|
'end'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
@ -45,7 +45,7 @@ void foo(int val) {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Bar extends FooBar {
|
class Bar extends FooBar {
|
||||||
String field1 = "my string";
|
String field1 = 'my string';
|
||||||
}
|
}
|
||||||
|
|
||||||
class FooBar {
|
class FooBar {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
void main(List<String> args) {
|
void main(List<String> args) {
|
||||||
String local1 = 'abcd';
|
String local1 = 'abcd';
|
||||||
int local2 = 2;
|
int local2 = 2;
|
||||||
var longList = [1, "hello", 3, 5, 7, 11, 13, 14, 15, 16, 17, 18, 19, 20];
|
var longList = [1, 'hello', 3, 5, 7, 11, 13, 14, 15, 16, 17, 18, 19, 20];
|
||||||
var deepList = [
|
var deepList = [
|
||||||
Bar(),
|
Bar(),
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,7 @@ void main(List<String> args) {
|
||||||
[7]
|
[7]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"end"
|
'end'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
@ -38,7 +38,7 @@ void foo(int val) {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Bar extends FooBar {
|
class Bar extends FooBar {
|
||||||
String field1 = "my string";
|
String field1 = 'my string';
|
||||||
}
|
}
|
||||||
|
|
||||||
class FooBar {
|
class FooBar {
|
||||||
|
|
|
@ -726,9 +726,9 @@ abstract class VmServiceInterface {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
if (m.deprecated) {
|
if (m.deprecated) {
|
||||||
gen.writeln("// ignore: deprecated_member_use_from_same_package");
|
gen.writeln('// ignore: deprecated_member_use_from_same_package');
|
||||||
}
|
}
|
||||||
gen.write("response = await _serviceImplementation.${m.name}(");
|
gen.write('response = await _serviceImplementation.${m.name}(');
|
||||||
// Positional args
|
// Positional args
|
||||||
m.args.where((arg) => !arg.optional).forEach((MethodArg arg) {
|
m.args.where((arg) => !arg.optional).forEach((MethodArg arg) {
|
||||||
if (arg.type.isArray) {
|
if (arg.type.isArray) {
|
||||||
|
@ -751,7 +751,7 @@ abstract class VmServiceInterface {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
gen.writeln(");");
|
gen.writeln(');');
|
||||||
}
|
}
|
||||||
gen.writeln('break;');
|
gen.writeln('break;');
|
||||||
}
|
}
|
||||||
|
@ -1009,9 +1009,9 @@ class Method extends Member {
|
||||||
// Special case for `getAllocationProfile`. We do not want to add these
|
// Special case for `getAllocationProfile`. We do not want to add these
|
||||||
// params if they are false.
|
// params if they are false.
|
||||||
if (name == 'getAllocationProfile') {
|
if (name == 'getAllocationProfile') {
|
||||||
gen.writeln("if (${arg.name} != null && ${arg.name})");
|
gen.writeln('if (${arg.name} != null && ${arg.name})');
|
||||||
} else {
|
} else {
|
||||||
gen.writeln("if (${arg.name} != null)");
|
gen.writeln('if (${arg.name} != null)');
|
||||||
}
|
}
|
||||||
gen.writeln("'${arg.name}': $valueRef,");
|
gen.writeln("'${arg.name}': $valueRef,");
|
||||||
});
|
});
|
||||||
|
@ -1374,7 +1374,7 @@ class Type extends Member {
|
||||||
|
|
||||||
// Build from JSON.
|
// Build from JSON.
|
||||||
gen.writeln();
|
gen.writeln();
|
||||||
String superCall = superName == null ? '' : ": super._fromJson(json) ";
|
String superCall = superName == null ? '' : ': super._fromJson(json) ';
|
||||||
if (name == 'Response' || name == 'TimelineEvent') {
|
if (name == 'Response' || name == 'TimelineEvent') {
|
||||||
gen.write('${name}._fromJson(this.json)');
|
gen.write('${name}._fromJson(this.json)');
|
||||||
} else {
|
} else {
|
||||||
|
@ -1414,39 +1414,39 @@ class Type extends Member {
|
||||||
} else if (name == 'Instance' && field.name == 'associations') {
|
} else if (name == 'Instance' && field.name == 'associations') {
|
||||||
// Special case `Instance.associations`.
|
// Special case `Instance.associations`.
|
||||||
gen.writeln("associations = json['associations'] == null "
|
gen.writeln("associations = json['associations'] == null "
|
||||||
"? null : List<MapAssociation>.from("
|
'? null : List<MapAssociation>.from('
|
||||||
"_createSpecificObject(json['associations'], MapAssociation.parse));");
|
"_createSpecificObject(json['associations'], MapAssociation.parse));");
|
||||||
} else if (name == 'Instance' && field.name == 'classRef') {
|
} else if (name == 'Instance' && field.name == 'classRef') {
|
||||||
// This is populated by `Obj`
|
// This is populated by `Obj`
|
||||||
} else if (name == '_CpuProfile' && field.name == 'codes') {
|
} else if (name == '_CpuProfile' && field.name == 'codes') {
|
||||||
// Special case `_CpuProfile.codes`.
|
// Special case `_CpuProfile.codes`.
|
||||||
gen.writeln("codes = List<CodeRegion>.from("
|
gen.writeln('codes = List<CodeRegion>.from('
|
||||||
"_createSpecificObject(json['codes']!, CodeRegion.parse));");
|
"_createSpecificObject(json['codes']!, CodeRegion.parse));");
|
||||||
} else if (name == '_CpuProfile' && field.name == 'functions') {
|
} else if (name == '_CpuProfile' && field.name == 'functions') {
|
||||||
// Special case `_CpuProfile.functions`.
|
// Special case `_CpuProfile.functions`.
|
||||||
gen.writeln("functions = List<ProfileFunction>.from("
|
gen.writeln('functions = List<ProfileFunction>.from('
|
||||||
"_createSpecificObject(json['functions']!, ProfileFunction.parse));");
|
"_createSpecificObject(json['functions']!, ProfileFunction.parse));");
|
||||||
} else if (name == 'SourceReport' && field.name == 'ranges') {
|
} else if (name == 'SourceReport' && field.name == 'ranges') {
|
||||||
// Special case `SourceReport.ranges`.
|
// Special case `SourceReport.ranges`.
|
||||||
gen.writeln("ranges = List<SourceReportRange>.from("
|
gen.writeln('ranges = List<SourceReportRange>.from('
|
||||||
"_createSpecificObject(json['ranges']!, SourceReportRange.parse));");
|
"_createSpecificObject(json['ranges']!, SourceReportRange.parse));");
|
||||||
} else if (name == 'SourceReportRange' && field.name == 'coverage') {
|
} else if (name == 'SourceReportRange' && field.name == 'coverage') {
|
||||||
// Special case `SourceReportRange.coverage`.
|
// Special case `SourceReportRange.coverage`.
|
||||||
gen.writeln("coverage = _createSpecificObject("
|
gen.writeln('coverage = _createSpecificObject('
|
||||||
"json['coverage'], SourceReportCoverage.parse);");
|
"json['coverage'], SourceReportCoverage.parse);");
|
||||||
} else if (name == 'Library' && field.name == 'dependencies') {
|
} else if (name == 'Library' && field.name == 'dependencies') {
|
||||||
// Special case `Library.dependencies`.
|
// Special case `Library.dependencies`.
|
||||||
gen.writeln("dependencies = List<LibraryDependency>.from("
|
gen.writeln('dependencies = List<LibraryDependency>.from('
|
||||||
"_createSpecificObject(json['dependencies']!, "
|
"_createSpecificObject(json['dependencies']!, "
|
||||||
"LibraryDependency.parse));");
|
'LibraryDependency.parse));');
|
||||||
} else if (name == 'Script' && field.name == 'tokenPosTable') {
|
} else if (name == 'Script' && field.name == 'tokenPosTable') {
|
||||||
// Special case `Script.tokenPosTable`.
|
// Special case `Script.tokenPosTable`.
|
||||||
gen.write("tokenPosTable = ");
|
gen.write('tokenPosTable = ');
|
||||||
if (field.optional) {
|
if (field.optional) {
|
||||||
gen.write("json['tokenPosTable'] == null ? null : ");
|
gen.write("json['tokenPosTable'] == null ? null : ");
|
||||||
}
|
}
|
||||||
gen.writeln("List<List<int>>.from(json['tokenPosTable']!.map"
|
gen.writeln("List<List<int>>.from(json['tokenPosTable']!.map"
|
||||||
"((dynamic list) => List<int>.from(list)));");
|
'((dynamic list) => List<int>.from(list)));');
|
||||||
gen.writeln('_parseTokenPosTable();');
|
gen.writeln('_parseTokenPosTable();');
|
||||||
} else if (field.type.isArray) {
|
} else if (field.type.isArray) {
|
||||||
TypeRef fieldType = field.type.types.first;
|
TypeRef fieldType = field.type.types.first;
|
||||||
|
@ -1454,41 +1454,43 @@ class Type extends Member {
|
||||||
String ref = "json['${field.name}']";
|
String ref = "json['${field.name}']";
|
||||||
if (field.optional) {
|
if (field.optional) {
|
||||||
if (fieldType.isListTypeSimple) {
|
if (fieldType.isListTypeSimple) {
|
||||||
gen.writeln("${field.generatableName} = $ref == null ? null : "
|
gen.writeln('${field.generatableName} = $ref == null ? null : '
|
||||||
"List<${fieldType.listTypeArg}>.from($ref);");
|
'List<${fieldType.listTypeArg}>.from($ref);');
|
||||||
} else {
|
} else {
|
||||||
gen.writeln("${field.generatableName} = $ref == null ? null : "
|
gen.writeln('${field.generatableName} = $ref == null ? null : '
|
||||||
"List<${fieldType.listTypeArg}>.from(createServiceObject($ref, $typesList)! as List);");
|
'List<${fieldType.listTypeArg}>.from(createServiceObject($ref, $typesList)! as List);');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fieldType.isListTypeSimple) {
|
if (fieldType.isListTypeSimple) {
|
||||||
// Special case `ClassHeapStats`. Pre 3.18, responses included keys
|
// Special case `ClassHeapStats`. Pre 3.18, responses included keys
|
||||||
// `new` and `old`. Post 3.18, these will be null.
|
// `new` and `old`. Post 3.18, these will be null.
|
||||||
if (name == 'ClassHeapStats') {
|
if (name == 'ClassHeapStats') {
|
||||||
gen.writeln("${field.generatableName} = $ref == null ? null : "
|
gen.writeln('${field.generatableName} = $ref == null ? null : '
|
||||||
"List<${fieldType.listTypeArg}>.from($ref);");
|
'List<${fieldType.listTypeArg}>.from($ref);');
|
||||||
} else {
|
} else {
|
||||||
gen.writeln("${field.generatableName} = "
|
gen.writeln('${field.generatableName} = '
|
||||||
"List<${fieldType.listTypeArg}>.from($ref);");
|
'List<${fieldType.listTypeArg}>.from($ref);');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Special case `InstanceSet`. Pre 3.20, instances were sent in a
|
// Special case `InstanceSet`. Pre 3.20, instances were sent in a
|
||||||
// field named 'samples' instead of 'instances'.
|
// field named 'samples' instead of 'instances'.
|
||||||
if (name == 'InstanceSet') {
|
if (name == 'InstanceSet') {
|
||||||
gen.writeln("${field.generatableName} = "
|
gen.writeln('${field.generatableName} = '
|
||||||
"List<${fieldType.listTypeArg}>.from(createServiceObject(($ref ?? json['samples']!) as List, $typesList)! as List);");
|
"List<${fieldType.listTypeArg}>.from(createServiceObject(($ref ?? json['samples']!) as List, $typesList)! as List);");
|
||||||
} else {
|
} else {
|
||||||
gen.writeln("${field.generatableName} = "
|
gen.writeln('${field.generatableName} = '
|
||||||
"List<${fieldType.listTypeArg}>.from(createServiceObject($ref, $typesList) as List? ?? []);");
|
'List<${fieldType.listTypeArg}>.from(createServiceObject($ref, $typesList) as List? ?? []);');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String typesList = _typeRefListToString(field.type.types);
|
String typesList = _typeRefListToString(field.type.types);
|
||||||
String nullable = field.type.name != 'dynamic' ? '?' : '';
|
String nullable = field.type.name != 'dynamic' ? '?' : '';
|
||||||
gen.writeln("${field.generatableName} = "
|
gen.writeln(
|
||||||
"createServiceObject(json['${field.name}'], "
|
'${field.generatableName} = '
|
||||||
"$typesList) as ${field.type.name}$nullable;");
|
"createServiceObject(json['${field.name}'], "
|
||||||
|
'$typesList) as ${field.type.name}$nullable;',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (fields.isNotEmpty) {
|
if (fields.isNotEmpty) {
|
||||||
|
@ -1585,7 +1587,7 @@ Map<String, dynamic> toJson() {
|
||||||
if (toStringFields.length <= maxFieldsShownInToString) {
|
if (toStringFields.length <= maxFieldsShownInToString) {
|
||||||
String properties = toStringFields
|
String properties = toStringFields
|
||||||
.map(
|
.map(
|
||||||
(TypeField f) => "${f.generatableName}: \${${f.generatableName}}")
|
(TypeField f) => '${f.generatableName}: \${${f.generatableName}}')
|
||||||
.join(', ');
|
.join(', ');
|
||||||
if (properties.length > 60) {
|
if (properties.length > 60) {
|
||||||
int index = properties.indexOf(', ', 55);
|
int index = properties.indexOf(', ', 55);
|
||||||
|
@ -1801,7 +1803,7 @@ class TypeField extends Member {
|
||||||
case 'String':
|
case 'String':
|
||||||
return "''";
|
return "''";
|
||||||
case 'ByteData':
|
case 'ByteData':
|
||||||
return "ByteData(0)";
|
return 'ByteData(0)';
|
||||||
}
|
}
|
||||||
if (type.isEnum) {
|
if (type.isEnum) {
|
||||||
// TODO(bkonyi): Figure out if there's a more correct way to determine a
|
// TODO(bkonyi): Figure out if there's a more correct way to determine a
|
||||||
|
|
|
@ -15,7 +15,7 @@ class DartGenerator {
|
||||||
|
|
||||||
final int colBoundary;
|
final int colBoundary;
|
||||||
|
|
||||||
String _indent = "";
|
String _indent = '';
|
||||||
final StringBuffer _buf = StringBuffer();
|
final StringBuffer _buf = StringBuffer();
|
||||||
|
|
||||||
bool _previousWasEol = false;
|
bool _previousWasEol = false;
|
||||||
|
@ -56,27 +56,27 @@ class DartGenerator {
|
||||||
writeln(str);
|
writeln(str);
|
||||||
} else {
|
} else {
|
||||||
writeln(str.substring(0, index + 1));
|
writeln(str.substring(0, index + 1));
|
||||||
writeln(" ${str.substring(index + 1)}");
|
writeln(' ${str.substring(index + 1)}');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
writeln(str);
|
writeln(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeln([String str = ""]) => _write("${str}\n");
|
void writeln([String str = '']) => _write('${str}\n');
|
||||||
|
|
||||||
void write(String str) => _write(str);
|
void write(String str) => _write(str);
|
||||||
|
|
||||||
void out(String str) => _buf.write(str);
|
void out(String str) => _buf.write(str);
|
||||||
|
|
||||||
void _writeln([String str = "", bool ignoreCurlies = false]) =>
|
void _writeln([String str = '', bool ignoreCurlies = false]) =>
|
||||||
_write("${str}\n", ignoreCurlies);
|
_write('${str}\n', ignoreCurlies);
|
||||||
|
|
||||||
void _write(String str, [bool ignoreCurlies = false]) {
|
void _write(String str, [bool ignoreCurlies = false]) {
|
||||||
for (final int rune in str.runes) {
|
for (final int rune in str.runes) {
|
||||||
if (!ignoreCurlies) {
|
if (!ignoreCurlies) {
|
||||||
if (rune == RUNE_LEFT_CURLY) {
|
if (rune == RUNE_LEFT_CURLY) {
|
||||||
_indent = "${_indent} ";
|
_indent = '${_indent} ';
|
||||||
} else if (rune == RUNE_RIGHT_CURLY && _indent.length >= 2) {
|
} else if (rune == RUNE_RIGHT_CURLY && _indent.length >= 2) {
|
||||||
_indent = _indent.substring(2);
|
_indent = _indent.substring(2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,7 +213,7 @@ class Api extends Member with ApiParseUtil {
|
||||||
writer.addLine('logUnknownResponse(consumer, json);');
|
writer.addLine('logUnknownResponse(consumer, json);');
|
||||||
}, modifiers: null, isOverride: true);
|
}, modifiers: null, isOverride: true);
|
||||||
|
|
||||||
writer.addMethod("convertMapToJsonObject", [
|
writer.addMethod('convertMapToJsonObject', [
|
||||||
JavaMethodArg('map', 'Map<String, String>')
|
JavaMethodArg('map', 'Map<String, String>')
|
||||||
], (StatementWriter writer) {
|
], (StatementWriter writer) {
|
||||||
writer.addLine('JsonObject obj = new JsonObject();');
|
writer.addLine('JsonObject obj = new JsonObject();');
|
||||||
|
@ -221,17 +221,17 @@ class Api extends Member with ApiParseUtil {
|
||||||
writer.addLine(' obj.addProperty(key, map.get(key));');
|
writer.addLine(' obj.addProperty(key, map.get(key));');
|
||||||
writer.addLine('}');
|
writer.addLine('}');
|
||||||
writer.addLine('return obj;');
|
writer.addLine('return obj;');
|
||||||
}, modifiers: "private", returnType: "JsonObject");
|
}, modifiers: 'private', returnType: 'JsonObject');
|
||||||
|
|
||||||
writer.addMethod(
|
writer.addMethod(
|
||||||
"convertIterableToJsonArray", [JavaMethodArg('list', 'Iterable')],
|
'convertIterableToJsonArray', [JavaMethodArg('list', 'Iterable')],
|
||||||
(StatementWriter writer) {
|
(StatementWriter writer) {
|
||||||
writer.addLine('JsonArray arr = new JsonArray();');
|
writer.addLine('JsonArray arr = new JsonArray();');
|
||||||
writer.addLine('for (Object element : list) {');
|
writer.addLine('for (Object element : list) {');
|
||||||
writer.addLine(' arr.add(new JsonPrimitive(element.toString()));');
|
writer.addLine(' arr.add(new JsonPrimitive(element.toString()));');
|
||||||
writer.addLine('}');
|
writer.addLine('}');
|
||||||
writer.addLine('return arr;');
|
writer.addLine('return arr;');
|
||||||
}, modifiers: "private", returnType: "JsonArray");
|
}, modifiers: 'private', returnType: 'JsonArray');
|
||||||
});
|
});
|
||||||
|
|
||||||
for (var m in methods) {
|
for (var m in methods) {
|
||||||
|
@ -534,7 +534,7 @@ class Method extends Member {
|
||||||
for (var t in returnType.types) {
|
for (var t in returnType.types) {
|
||||||
writer.addImport(t.elementTypeName);
|
writer.addImport(t.elementTypeName);
|
||||||
writer.addMethod(
|
writer.addMethod(
|
||||||
"received", [JavaMethodArg('response', t.elementTypeName)], null);
|
'received', [JavaMethodArg('response', t.elementTypeName)], null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -925,7 +925,7 @@ class TypeField extends Member {
|
||||||
for (TypeRef t in type.types) {
|
for (TypeRef t in type.types) {
|
||||||
String refName = t.name!;
|
String refName = t.name!;
|
||||||
if (refName.endsWith('Ref')) {
|
if (refName.endsWith('Ref')) {
|
||||||
refName = "@" + refName.substring(0, refName.length - 3);
|
refName = '@' + refName.substring(0, refName.length - 3);
|
||||||
}
|
}
|
||||||
w.addLine('if (elem.get("type").getAsString().equals("${refName}")) '
|
w.addLine('if (elem.get("type").getAsString().equals("${refName}")) '
|
||||||
'return new ${t.name}(elem);');
|
'return new ${t.name}(elem);');
|
||||||
|
|
|
@ -125,10 +125,9 @@ class TypeWriter {
|
||||||
final Map<String, String> _methods = Map<String, String>();
|
final Map<String, String> _methods = Map<String, String>();
|
||||||
final String scriptLocation;
|
final String scriptLocation;
|
||||||
|
|
||||||
TypeWriter(String typeName, scriptLocation)
|
TypeWriter(String typeName, this.scriptLocation)
|
||||||
: this.pkgName = pkgNameFor(typeName),
|
: pkgName = pkgNameFor(typeName),
|
||||||
this.className = classNameFor(typeName),
|
className = classNameFor(typeName);
|
||||||
this.scriptLocation = scriptLocation;
|
|
||||||
|
|
||||||
String get kind {
|
String get kind {
|
||||||
if (isInterface) return 'interface';
|
if (isInterface) return 'interface';
|
||||||
|
|
Loading…
Reference in a new issue