anchor.diff:          'typeFactories[${resolveClassIdentifier(clazz.type)}] = (f) => ');
       factories.write('new ${resolveClassIdentifier(clazz.type)}(');
       ConstructorElement constr =
  -        clazz.constructors.firstWhere((c) => c.name.isEmpty);
  -    factories.write(constr.parameters.map((param) =>
  -        'f(${resolveClassIdentifier(param.type)})').join(', '));
  +        clazz.constructors.firstWhere((c) => c.name.isEmpty,
  +        orElse: () {
  +          throw 'Unable to find default constructor for $clazz in ${clazz.source}';
  +        });
  +    factories.write(constr.parameters.map((param) {
  +      if (param.type.element is! ClassElement) {
  +        throw 'Unable to resolve type for constructor parameter '
  +              '"${param.name}" for type "$clazz" in ${clazz.source}';
  +      }
  +      return 'f(${resolveClassIdentifier(param.type)})';
  +    }).join(', '));
       factories.write(');\n');
     });
     StringBuffer code = new StringBuffer();
  
positive.code:         int annotationIdx = 0;
          library.metadata.forEach((Annotation ann) {
            if (ann.element is ConstructorElement &&
                getQualifiedName(
                    (ann.element as ConstructorElement).enclosingElement.type) ==
                    'di.annotations.Injectables') {
              var listLiteral =
                  library.metadata[annotationIdx].arguments.arguments.first;
              for (Expression element in listLiteral.elements) {
                typeFactoryTypes
                   .add((element as SimpleIdentifier).bestElement as ClassElement);
              }
            }
            annotationIdx++;
  
negative.code:   StringBuffer factories = new StringBuffer();
  
    String resolveClassIdentifier(InterfaceType type) {
      if (type.element.library.isDartCore) {
        return type.name;
      }
      String import = typeToImport[getCanonicalName(type)];
  