Records 'unknown source' for internal converters.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@369 d779f126-a31b-0410-b53b-1d3aecad763e
diff --git a/src/com/google/inject/BinderImpl.java b/src/com/google/inject/BinderImpl.java
index 727b9b7..c5498df 100644
--- a/src/com/google/inject/BinderImpl.java
+++ b/src/com/google/inject/BinderImpl.java
@@ -140,7 +140,7 @@
       }
     });
 
-    convertToTypes(
+    internalConvertToTypes(
       new AbstractMatcher<TypeLiteral<?>>() {
         public boolean matches(TypeLiteral<?> typeLiteral) {
           return typeLiteral.getRawType() == Class.class;
@@ -193,7 +193,7 @@
 
   void convertToClasses(final Matcher<? super Class<?>> typeMatcher,
       TypeConverter converter) {
-    convertToTypes(new AbstractMatcher<TypeLiteral<?>>() {
+    internalConvertToTypes(new AbstractMatcher<TypeLiteral<?>>() {
       public boolean matches(TypeLiteral<?> typeLiteral) {
         Type type = typeLiteral.getType();
         if (!(type instanceof Class)) {
@@ -209,6 +209,12 @@
     }, converter);
   }
 
+  public void internalConvertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher,
+      TypeConverter converter) {
+    converters.add(MatcherAndConverter.newInstance(typeMatcher, converter,
+        SourceProviders.UNKNOWN_SOURCE));
+  }
+
   public void convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher,
       TypeConverter converter) {
     converters.add(MatcherAndConverter.newInstance(typeMatcher, converter));
diff --git a/src/com/google/inject/MatcherAndConverter.java b/src/com/google/inject/MatcherAndConverter.java
index d0a2de3..5b59ef3 100644
--- a/src/com/google/inject/MatcherAndConverter.java
+++ b/src/com/google/inject/MatcherAndConverter.java
@@ -36,6 +36,13 @@
   final Object source;
 
   MatcherAndConverter(Matcher<? super TypeLiteral<?>> typeMatcher,
+      TypeConverter typeConverter, Object source) {
+    this.typeMatcher = Objects.nonNull(typeMatcher, "type matcher");
+    this.typeConverter = Objects.nonNull(typeConverter, "converter");
+    this.source = source;
+  }
+
+  MatcherAndConverter(Matcher<? super TypeLiteral<?>> typeMatcher,
       TypeConverter typeConverter) {
     this.typeMatcher = Objects.nonNull(typeMatcher, "type matcher");
     this.typeConverter = Objects.nonNull(typeConverter, "converter");
@@ -47,4 +54,10 @@
       TypeConverter typeConverter) {
     return new MatcherAndConverter<T>(typeMatcher, typeConverter);
   }
+
+  static <T> MatcherAndConverter<T> newInstance(
+      Matcher<? super TypeLiteral<?>> typeMatcher,
+      TypeConverter typeConverter, Object source) {
+    return new MatcherAndConverter<T>(typeMatcher, typeConverter, source);
+  }
 }