diff --git a/.packages b/.packages index 10b7f5a..1bc3a07 100644 --- a/.packages +++ b/.packages @@ -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/ @@ -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/ diff --git a/lib/nomirrorsmap.dart b/lib/nomirrorsmap.dart index 9791e40..31e48e7 100644 --- a/lib/nomirrorsmap.dart +++ b/lib/nomirrorsmap.dart @@ -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 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); } } diff --git a/lib/nomirrorsmap_mirrors.dart b/lib/nomirrorsmap_mirrors.dart index 1200ad6..05104a9 100644 --- a/lib/nomirrorsmap_mirrors.dart +++ b/lib/nomirrorsmap_mirrors.dart @@ -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; @@ -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); } diff --git a/lib/src/transformer/map_generator_transformer.dart b/lib/src/transformer/map_generator_transformer.dart index da84e86..d534963 100644 --- a/lib/src/transformer/map_generator_transformer.dart +++ b/lib/src/transformer/map_generator_transformer.dart @@ -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 methodInvocations = body.block.statements .where((statement) => statement is ExpressionStatement && statement.expression is MethodInvocation) diff --git a/lib/src/transformer/mappings_generator.dart b/lib/src/transformer/mappings_generator.dart index 8be1564..8fb6a72 100644 --- a/lib/src/transformer/mappings_generator.dart +++ b/lib/src/transformer/mappings_generator.dart @@ -55,7 +55,8 @@ class MappingsGenerator { Iterable _getTypesThatShouldBeMapped( List types, List 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) { diff --git a/pubspec.yaml b/pubspec.yaml index 487d120..c61ed63 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: nomirrorsmap -version: 1.0.20 +version: 1.0.22 author: jrote1 description: A library for mapping without mirrors this includes JSON and Object to Object homepage: https://github.com/jrote1/nomirrorsmap.dart @@ -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