Renamed base package names from org.opendaylight.controller to org.opendaylight.yangt...
[yangtools.git] / code-generator / binding-java-api-generator / src / main / java / org / opendaylight / yangtools / sal / java / api / generator / GeneratorUtil.java
@@ -5,32 +5,32 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.controller.sal.java.api.generator;
+package org.opendaylight.yangtools.sal.java.api.generator;
 
-import static org.opendaylight.controller.sal.java.api.generator.Constants.COMMA;
+import static org.opendaylight.yangtools.sal.java.api.generator.Constants.COMMA;
 
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.opendaylight.controller.binding.generator.util.TypeConstants;
-import org.opendaylight.controller.binding.generator.util.Types;
-import org.opendaylight.controller.sal.binding.model.api.Constant;
-import org.opendaylight.controller.sal.binding.model.api.GeneratedProperty;
-import org.opendaylight.controller.sal.binding.model.api.GeneratedTransferObject;
-import org.opendaylight.controller.sal.binding.model.api.GeneratedType;
-import org.opendaylight.controller.sal.binding.model.api.MethodSignature;
-import org.opendaylight.controller.sal.binding.model.api.ParameterizedType;
-import org.opendaylight.controller.sal.binding.model.api.Type;
-import org.opendaylight.controller.sal.binding.model.api.WildcardType;
+import org.opendaylight.yangtools.binding.generator.util.TypeConstants;
+import org.opendaylight.yangtools.binding.generator.util.Types;
+import org.opendaylight.yangtools.sal.binding.model.api.Constant;
+import org.opendaylight.yangtools.sal.binding.model.api.GeneratedProperty;
+import org.opendaylight.yangtools.sal.binding.model.api.GeneratedTransferObject;
+import org.opendaylight.yangtools.sal.binding.model.api.GeneratedType;
+import org.opendaylight.yangtools.sal.binding.model.api.MethodSignature;
+import org.opendaylight.yangtools.sal.binding.model.api.ParameterizedType;
+import org.opendaylight.yangtools.sal.binding.model.api.Type;
+import org.opendaylight.yangtools.sal.binding.model.api.WildcardType;
 
 
 public final class GeneratorUtil {
 
     private GeneratorUtil() {
     }
-    
+
     public static Map<String, String> createImports(GeneratedType genType) {
         if (genType == null) {
             throw new IllegalArgumentException("Generated Type cannot be NULL!");
@@ -97,7 +97,7 @@ public final class GeneratorUtil {
 
         return imports;
     }
-    
+
     public static void putTypeIntoImports(final GeneratedType parentGenType, final Type type,
             final Map<String, String> imports) {
         if (parentGenType == null) {
@@ -139,7 +139,7 @@ public final class GeneratorUtil {
             }
         }
     }
-    
+
     public static boolean isConstantInTO(String constName, GeneratedTransferObject genTO) {
         if (constName == null || genTO == null)
             throw new IllegalArgumentException();
@@ -152,7 +152,7 @@ public final class GeneratorUtil {
         }
         return false;
     }
-    
+
     public static Map<String, String> createChildImports(GeneratedType genType) {
         Map<String, String> childImports = new LinkedHashMap<>();
         List<GeneratedType> childGeneratedTypes = genType.getEnclosedTypes();
@@ -219,7 +219,7 @@ public final class GeneratorUtil {
             return builder.toString();
         }
     }
-    
+
     private static String getParameters(final GeneratedType parentGenType, final Type[] pTypes, Map<String, String> availableImports) {
         final StringBuilder builder = new StringBuilder();
         for (int i = 0; i < pTypes.length; i++) {
@@ -245,11 +245,11 @@ public final class GeneratorUtil {
         }
         return builder.toString();
     }
-    
+
     /**
      * The method returns reference to highest (top parent) Generated Transfer
      * Object.
-     * 
+     *
      * @param childTransportObject
      *            is generated transfer object which can be extended by other
      *            generated transfer object
@@ -267,11 +267,11 @@ public final class GeneratorUtil {
             return getTopParrentTransportObject(childTransportObject.getExtends());
         }
     }
-    
+
     /**
      * The method selects from input list of properties only those which have
      * read only attribute set to true.
-     * 
+     *
      * @param properties
      *            contains list of properties of generated transfer object
      * @return subset of <code>properties</code> which have read only attribute
@@ -288,12 +288,12 @@ public final class GeneratorUtil {
         }
         return readOnlyProperties;
     }
-    
+
     /**
      * The method returns the list of the properties of all extending generated
      * transfer object from <code>genTO</code> to highest parent generated
      * transfer object
-     * 
+     *
      * @param genTO
      * @return the list of all properties from actual to highest parent
      *         generated transfer object. In case when extension exists the
@@ -309,5 +309,5 @@ public final class GeneratorUtil {
         }
         return propertiesOfAllParents;
     }
-    
+
 }