Skip to content

Commit

Permalink
Fixed styling a build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jrote1 committed Dec 3, 2015
1 parent 4145a0a commit 9f8f424
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .packages
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by pub on 2015-12-02 10:43:24.642.
# Generated by pub on 2015-12-03 09:20:10.458.
analyzer:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.26.3/lib/
args:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/args-0.13.2/lib/
async:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/async-1.4.0/lib/
Expand All @@ -19,11 +19,11 @@ logging:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/
matcher:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/matcher-0.12.0+1/lib/
mime:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/mime-0.9.3/lib/
package_config:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_config-0.1.3/lib/
path:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.3.8/lib/
path:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.3.9/lib/
plugin:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/plugin-0.1.0/lib/
pool:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pool-1.2.1/lib/
pub_semver:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pub_semver-1.2.3/lib/
reflective:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/reflective-0.0.19/lib/
reflective:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/reflective-0.0.23/lib/
shelf:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf-0.6.4+2/lib/
shelf_static:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_static-0.2.3+1/lib/
shelf_web_socket:file:///C:/Users/Jake/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_web_socket-0.0.1+4/lib/
Expand Down
9 changes: 6 additions & 3 deletions lib/nomirrorsmap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ import 'src/manipulators/manipulators.dart';

class NoMirrorsMap {
NoMirrorsMap() {
if (TypeInformationRetrieverLocator.instance == null) TypeInformationRetrieverLocator
if (TypeInformationRetrieverLocator.instance ==
null) TypeInformationRetrieverLocator
.setInstance(new NoMirrorsMapStore());
}

dynamic convert(dynamic value, Converter sourceConverter, Converter destinationConverter,
dynamic convert(
dynamic value, Converter sourceConverter, Converter destinationConverter,
[List<BaseObjectDataManipulator> manipulators]) {
var convertedSource = sourceConverter.toBaseIntermediateObject(value);
if (manipulators != null) manipulators.forEach((m) => m.manipulate(convertedSource));
if (manipulators != null) manipulators
.forEach((m) => m.manipulate(convertedSource));
return destinationConverter.fromBaseIntermediateObject(convertedSource);
}
}
6 changes: 3 additions & 3 deletions lib/nomirrorsmap_mirrors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class MirrorsTypeInformationRetriever implements TypeInformationRetriever {
..getter = field.value;

result.fields.add(new ClassField()
..type = field.type.type
..type = field.type.rawType
..fieldMapping = fieldMapping);
}
result.type = type;
Expand All @@ -39,14 +39,14 @@ class MirrorsTypeInformationRetriever implements TypeInformationRetriever {
@override
ClassMapping getClassGeneratedMapByListType(Type type) {
var classType =
new reflective.TypeReflection(type).typeArguments.first.type;
new reflective.TypeReflection(type).typeArguments.first.rawType;
return getClassGeneratedMap(classType);
}

@override
ClassMapping getClassGeneratedMapByQualifiedName(String qualifiedName) {
var classType =
new reflective.TypeReflection.fromFullName(qualifiedName).type;
new reflective.TypeReflection.fromFullName(qualifiedName).rawType;
return getClassGeneratedMap(classType);
}

Expand Down
2 changes: 0 additions & 2 deletions lib/src/transformer/map_generator_transformer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ class MapGeneratorTransformer extends Transformer with ResolverTransformer {
var body = main.body;

if (body is BlockFunctionBody) {
var methodInvocation =
body.getAncestor((node) => node is MethodInvocation);
Iterable<MethodInvocation> methodInvocations = body.block.statements
.where((statement) => statement is ExpressionStatement &&
statement.expression is MethodInvocation)
Expand Down
3 changes: 2 additions & 1 deletion lib/src/transformer/mappings_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class MappingsGenerator {

Iterable<ClassElement> _getTypesThatShouldBeMapped(
List<ClassElement> types, List<LibraryElement> libraries) sync* {
var mappableMetadataType = _resolver.getType("nomirrorsmap.shared.Mappable");
var mappableMetadataType =
_resolver.getType("nomirrorsmap.shared.Mappable");
for (var type in types) {
if (libraries.contains(type.library)) yield type;
if (mappableMetadataType != null) {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: nomirrorsmap
version: 1.0.20
version: 1.0.22
author: jrote1<[email protected]>
description: A library for mapping without mirrors this includes JSON and Object to Object
homepage: https://github.com/jrote1/nomirrorsmap.dart
Expand All @@ -9,6 +9,6 @@ dependencies:
code_transformers: any
dart_style: any
path: '>=1.0.0 <2.0.0'
reflective: '0.0.19'
reflective: '^0.0.23'
dev_dependencies:
unittest: any

0 comments on commit 9f8f424

Please sign in to comment.