blob: 725f0f5545000da7dedc3120c30b6a8d692d3863 [file] [log] [blame]
Vinod Kumar S38046502016-03-23 15:30:27 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Vinod Kumar S38046502016-03-23 15:30:27 +05303 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.yangutils.translator.tojava.javamodel;
17
18import org.onosproject.yangutils.datamodel.YangUses;
Vinod Kumar S38046502016-03-23 15:30:27 +053019import org.onosproject.yangutils.translator.tojava.JavaCodeGenerator;
janani bde4ffab2016-04-15 16:18:30 +053020import org.onosproject.yangutils.translator.tojava.utils.YangPluginConfig;
Vinod Kumar S38046502016-03-23 15:30:27 +053021
Vinod Kumar S38046502016-03-23 15:30:27 +053022/**
Bharat saraswald9822e92016-04-05 15:13:44 +053023 * Represents uses information extended to support java code generation.
Vinod Kumar S38046502016-03-23 15:30:27 +053024 */
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053025public class YangJavaUses
26 extends YangUses
27 implements JavaCodeGenerator {
Vinod Kumar S38046502016-03-23 15:30:27 +053028
29 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053030 * Creates YANG java uses object.
Vinod Kumar S38046502016-03-23 15:30:27 +053031 */
32 public YangJavaUses() {
33 super();
Vinod Kumar S38046502016-03-23 15:30:27 +053034 }
35
36 /**
37 * Prepare the information for java code generation corresponding to YANG
Bharat saraswalcc1cdab2016-04-16 02:28:25 +053038 * uses info.
Vinod Kumar S38046502016-03-23 15:30:27 +053039 *
janani bde4ffab2016-04-15 16:18:30 +053040 * @param yangPlugin YANG plugin config
Vinod Kumar S38046502016-03-23 15:30:27 +053041 */
42 @Override
janani bde4ffab2016-04-15 16:18:30 +053043 public void generateCodeEntry(YangPluginConfig yangPlugin) {
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053044 /*Do nothing, the uses will copy the contents to the used location*/
Vinod Kumar S38046502016-03-23 15:30:27 +053045 }
46
47 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +053048 * Create a java file using the YANG uses info.
Vinod Kumar S38046502016-03-23 15:30:27 +053049 */
50 @Override
51 public void generateCodeExit() {
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053052 /*Do nothing, the uses will copy the contents to the used location*/
Vinod Kumar S38046502016-03-23 15:30:27 +053053 }
54}