java.util.Collectionorg.gradle.internal.exceptions.DiagnosticsVisitor



Project gradle/gradle in file ...dle.internal.typeconversion.NotationConverter.java (2015-02-01)
@@ -16,7 +16,7 @@
 
 package org.gradle.internal.typeconversion;
 
-import java.util.Collection;
+import org.gradle.internal.exceptions.DiagnosticsVisitor;
 
 /**
  * A converter from notations of type {@link N} to results of type {@link T}.
@@ -34,5 +34,5 @@ public interface NotationConverter<N, T> {
     /**
      * Describes the formats that this converter accepts.
      */
-    void describe(Collection<String> candidateFormats);
+    void describe(DiagnosticsVisitor visitor);
 }
Project gradle/gradle in file ...gradle.internal.typeconversion.NotationParser.java (2015-02-01)
@@ -16,7 +16,7 @@
 
 package org.gradle.internal.typeconversion;
 
-import java.util.Collection;
+import org.gradle.internal.exceptions.DiagnosticsVisitor;
 
 /**
  * A parser from notations of type {@link N} to a result of type {@link T}. This interface is used by clients to perform the parsing. To implement a parser, you should use {@link NotationConverter}
@@ -32,5 +32,5 @@ public interface NotationParser<N, T> {
     /**
      * Describes the formats that the parser accepts.
      */
-    void describe(Collection<String> candidateFormats);
+    void describe(DiagnosticsVisitor visitor);
 }
Project gradle/gradle in file ...ternal.artifacts.ExcludeRuleNotationConverter.java (2015-02-01)
@@ -19,13 +19,12 @@ package org.gradle.api.internal.artifacts;
 import org.gradle.api.InvalidUserDataException;
 import org.gradle.api.artifacts.ExcludeRule;
 import org.gradle.api.tasks.Optional;
+import org.gradle.internal.exceptions.DiagnosticsVisitor;
 import org.gradle.internal.typeconversion.MapKey;
 import org.gradle.internal.typeconversion.MapNotationConverter;
 import org.gradle.internal.typeconversion.NotationParser;
 import org.gradle.internal.typeconversion.NotationParserBuilder;
 
-import java.util.Collection;
-
 public class ExcludeRuleNotationConverter extends MapNotationConverter<ExcludeRule> {
 
     private static final NotationParser<Object, ExcludeRule> PARSER =
@@ -36,8 +35,8 @@ public class ExcludeRuleNotationConverter extends MapNotationConverter<ExcludeRu
     }
 
     @Override
-    public void describe(Collection<String> candidateFormats) {
-        candidateFormats.add("Maps with 'group' and/or 'module', e.g. [group: 'com.google.collections', module: 'google-collections'].");
+    public void describe(DiagnosticsVisitor visitor) {
+        visitor.candidate("Maps with 'group' and/or 'module', e.g. [group: 'com.google.collections', module: 'google-collections'].");
     }
 
     protected ExcludeRule parseMap(@MapKey(ExcludeRule.GROUP_KEY) @Optional String group,
Project gradle/gradle in file ...rnal.notations.DependencyMapNotationConverter.java (2015-02-01)
@@ -17,12 +17,11 @@ package org.gradle.api.internal.notations;
 
 import org.gradle.api.artifacts.ExternalDependency;
 import org.gradle.api.internal.artifacts.dsl.dependencies.ModuleFactoryHelper;
-import org.gradle.internal.typeconversion.MapKey;
-import org.gradle.internal.typeconversion.MapNotationConverter;
 import org.gradle.api.tasks.Optional;
+import org.gradle.internal.exceptions.DiagnosticsVisitor;
 import org.gradle.internal.reflect.Instantiator;
-
-import java.util.Collection;
+import org.gradle.internal.typeconversion.MapKey;
+import org.gradle.internal.typeconversion.MapNotationConverter;
 
 public class DependencyMapNotationConverter<T extends ExternalDependency> extends MapNotationConverter<T> {
 
@@ -35,8 +34,8 @@ public class DependencyMapNotationConverter<T extends ExternalDependency> extend
     }
 
     @Override
-    public void describe(Collection<String> candidateFormats) {
-        candidateFormats.add("Maps, e.g. [group: 'org.gradle', name: 'gradle-core', version: '1.0'].");
+    public void describe(DiagnosticsVisitor visitor) {
+        visitor.candidate("Maps, e.g. [group: 'org.gradle', name: 'gradle-core', version: '1.0'].");
     }
 
     protected T parseMap(@MapKey("group") @Optional String group,
Project gradle/gradle in file ...gradle.api.internal.file.AbstractFileResolver.java (2015-02-01)
@@ -24,6 +24,7 @@ import org.gradle.api.file.FileTree;
 import org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection;
 import org.gradle.api.resources.ReadableResource;
 import org.gradle.internal.Factory;
+import org.gradle.internal.exceptions.DiagnosticsVisitor;
 import org.gradle.internal.nativeintegration.filesystem.FileSystem;
 import org.gradle.internal.os.OperatingSystem;
 import org.gradle.internal.typeconversion.NotationParser;
@@ -34,7 +35,6 @@ import java.io.File;
 import java.io.IOException;
 import java.net.URI;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 import java.util.concurrent.Callable;
 import java.util.regex.Pattern;
@@ -67,8 +67,9 @@ public abstract class AbstractFileResolver implements FileResolver {
                 return resolve(notation, PathValidation.NONE);
             }
 
-            public void describe(Collection<String> candidateFormats) {
-                candidateFormats.add("Anything that can be converted to a file, as per Project.file()");
+            @Override
+            public void describe(DiagnosticsVisitor visitor) {
+                visitor.candidate("Anything that can be converted to a file, as per Project.file()");
             }
         };
     }