blob: 277038cd1bfc6217201e28a4c4998fe8cc7b2fd7 [file] [log] [blame]
Bharat saraswal870c56f2016-02-20 21:57:16 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Bharat saraswal870c56f2016-02-20 21:57:16 +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 */
16
17package org.onosproject.yangutils.translator.tojava;
18
Bharat saraswalab4c6ba2016-05-17 14:19:38 +053019import org.onosproject.yangutils.translator.exception.TranslatorException;
janani bde4ffab2016-04-15 16:18:30 +053020import org.onosproject.yangutils.translator.tojava.utils.YangPluginConfig;
21
Bharat saraswal870c56f2016-02-20 21:57:16 +053022/**
Vinod Kumar S38046502016-03-23 15:30:27 +053023 * Abstraction of an entity which provides Code generator functionalities.
Bharat saraswal870c56f2016-02-20 21:57:16 +053024 */
Vinod Kumar S38046502016-03-23 15:30:27 +053025public interface JavaCodeGenerator {
Bharat saraswal870c56f2016-02-20 21:57:16 +053026
27 /**
Vinod Kumar S38046502016-03-23 15:30:27 +053028 * Traverse the schema of application and generate corresponding code.
Bharat saraswal870c56f2016-02-20 21:57:16 +053029 *
janani bde4ffab2016-04-15 16:18:30 +053030 * @param yangPlugin YANG plugin config
Bharat saraswalab4c6ba2016-05-17 14:19:38 +053031 * @throws TranslatorException when fails to translate the data model tree
Bharat saraswal870c56f2016-02-20 21:57:16 +053032 */
VinodKumarS-Huaweicb3a1f52016-05-10 17:58:57 +053033 void generateCodeEntry(YangPluginConfig yangPlugin)
Bharat saraswalab4c6ba2016-05-17 14:19:38 +053034 throws TranslatorException;
Bharat saraswal870c56f2016-02-20 21:57:16 +053035
Vinod Kumar S38046502016-03-23 15:30:27 +053036 /**
37 * Traverse the schema of application and generate corresponding code.
38 *
Bharat saraswalab4c6ba2016-05-17 14:19:38 +053039 * @throws TranslatorException when fails to generate java code
Vinod Kumar S38046502016-03-23 15:30:27 +053040 */
VinodKumarS-Huaweicb3a1f52016-05-10 17:58:57 +053041 void generateCodeExit()
Bharat saraswalab4c6ba2016-05-17 14:19:38 +053042 throws TranslatorException;
Bharat saraswal870c56f2016-02-20 21:57:16 +053043}