YANG Translator optimization

Change-Id: Ie6a6b9d371a4fc5fd973cf56d6f3c7b44a3146ba
diff --git a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/JavaFileInfo.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/JavaFileInfo.java
new file mode 100644
index 0000000..8b69fca
--- /dev/null
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/JavaFileInfo.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.translator.tojava;
+
+/**
+ * Cached java file handle, which supports the addition of member attributes and
+ * methods.
+ */
+public class JavaFileInfo {
+    /**
+     * The type(s) of java source file(s) to be generated when the cached file
+     * handle is closed.
+     */
+    private int genFileTypes;
+
+    /**
+     * Name of the module.
+     */
+    private String javaName;
+
+    /**
+     * java Package of the mapped java class.
+     */
+    private String pkg;
+
+    /**
+     * File generation directory path.
+     */
+    private String relativeFilePath;
+
+    /**
+     * File generation base directory path.
+     */
+    private String codeGenDirFilePath;
+
+    /**
+     * Get the types of files being generated corresponding to the YANG
+     * definition.
+     *
+     * @return the types of files being generated corresponding to the YANG
+     *         definition
+     */
+    public int getGeneratedFileTypes() {
+        return genFileTypes;
+    }
+
+    /**
+     * Set the types of files being generated corresponding to the YANG
+     * definition.
+     *
+     * @param fileTypes the types of files being generated corresponding to the
+     *            YANG definition
+     */
+    public void setGeneratedFileTypes(int fileTypes) {
+        genFileTypes = fileTypes;
+    }
+
+    /**
+     * Get the java name of the node.
+     *
+     * @return the java name of node
+     */
+    public String getJavaName() {
+        return javaName;
+    }
+
+    /**
+     * Set the java name of the node.
+     *
+     * @param name the java name of node
+     */
+    public void setJavaName(String name) {
+        javaName = name;
+    }
+
+    /**
+     * Get the mapped java package.
+     *
+     * @return the java package
+     */
+    public String getPackage() {
+        if (pkg == null) {
+            throw new RuntimeException("Referencing package of a generated java file which is not set");
+        }
+        return pkg;
+    }
+
+    /**
+     * Set the node's package.
+     *
+     * @param nodePackage node's package
+     */
+    public void setPackage(String nodePackage) {
+        pkg = nodePackage;
+    }
+
+    /**
+     * Sets directory package path for code generation.
+     *
+     * @param path directory package path for code generation
+     */
+    public void setPackageFilePath(String path) {
+        relativeFilePath = path;
+    }
+
+    /**
+     * Gets directory package path for code generation.
+     *
+     * @return directory package path for code generation
+     */
+    public String getPackageFilePath() {
+        return relativeFilePath;
+    }
+
+    /**
+     * Gets base directory package path for code generation.
+     *
+     * @return directory package path for code generation
+     */
+    public String getBaseCodeGenPath() {
+        return codeGenDirFilePath;
+    }
+
+    /**
+     * Sets base directory package path for code generation.
+     *
+     * @param path base directory path
+     */
+    public void setBaseCodeGenPath(String path) {
+        codeGenDirFilePath = path;
+    }
+}