Use BindingTypes.identifiable()
[mdsal.git] / binding / mdsal-binding-java-api-generator / src / main / java / org / opendaylight / mdsal / binding / java / api / generator / GeneratorJavaFile.java
index fab2785a0fb8f0c620f3853c7486768a8f26f6b5..c7b1c3728446c514cd79f71e1717f6ac76b0c404 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.mdsal.binding.java.api.generator;
 import static java.util.Objects.requireNonNull;
 
 import com.google.common.base.MoreObjects;
-import com.google.common.base.Preconditions;
 import com.google.common.collect.HashBasedTable;
 import com.google.common.collect.Table;
 import java.io.File;
@@ -26,7 +25,6 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Generates files with JAVA source codes for every specified type.
- *
  */
 public final class GeneratorJavaFile {
     public enum FileKind {
@@ -73,17 +71,14 @@ public final class GeneratorJavaFile {
     private final Collection<? extends Type> types;
 
     /**
-     * Creates instance of this class with the set of <code>types</code> for
-     * which the JAVA code is generated. Generator instantiated this way uses
-     * the default build context, e.g. it will re-generate any and all files.
-     *
-     * The instances of concrete JAVA code generator are created.
+     * Creates instance of this class with the set of <code>types</code> for which the JAVA code is generated. Generator
+     * instantiated this way uses the default build context, e.g. it will re-generate any and all files. The instances
+     * of concrete JAVA code generator are created.
      *
-     * @param types
-     *            set of types for which JAVA code should be generated
+     * @param types set of types for which JAVA code should be generated
      */
     public GeneratorJavaFile(final Collection<? extends Type> types) {
-        this.types = Preconditions.checkNotNull(types);
+        this.types = requireNonNull(types);
         generators.add(new InterfaceGenerator());
         generators.add(new TOGenerator());
         generators.add(new EnumGenerator());
@@ -122,17 +117,13 @@ public final class GeneratorJavaFile {
     }
 
     /**
-     * Creates the package directory path as concatenation of
-     * <code>parentDirectory</code> and parsed <code>packageName</code>. The
-     * parsing of <code>packageName</code> is realized as replacement of the
-     * package name dots with the file system separator.
+     * Creates the package directory path as concatenation of <code>parentDirectory</code> and parsed
+     * <code>packageName</code>. The parsing of <code>packageName</code> is realized as replacement of the package name
+     * dots with the file system separator.
      *
-     * @param parentDirectory
-     *            <code>File</code> object with reference to parent directory
-     * @param packageName
-     *            string with the name of the package
-     * @return <code>File</code> object which refers to the new directory for
-     *         package <code>packageName</code>
+     * @param parentDirectory <code>File</code> object with reference to parent directory
+     * @param packageName string with the name of the package
+     * @return <code>File</code> object which refers to the new directory for package <code>packageName</code>
      */
     public static File packageToDirectory(final File parentDirectory, final String packageName) {
         if (packageName == null) {