blob: 4fd049dd358f0498719f142ecb7a0fd01f4d4f00 [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
19import java.io.IOException;
20
janani bde4ffab2016-04-15 16:18:30 +053021import org.onosproject.yangutils.translator.tojava.utils.YangPluginConfig;
22
Bharat saraswal870c56f2016-02-20 21:57:16 +053023/**
Vinod Kumar S38046502016-03-23 15:30:27 +053024 * Abstraction of an entity which provides Code generator functionalities.
Bharat saraswal870c56f2016-02-20 21:57:16 +053025 */
Vinod Kumar S38046502016-03-23 15:30:27 +053026public interface JavaCodeGenerator {
Bharat saraswal870c56f2016-02-20 21:57:16 +053027
28 /**
Vinod Kumar S38046502016-03-23 15:30:27 +053029 * Traverse the schema of application and generate corresponding code.
Bharat saraswal870c56f2016-02-20 21:57:16 +053030 *
janani bde4ffab2016-04-15 16:18:30 +053031 * @param yangPlugin YANG plugin config
Vinod Kumar S38046502016-03-23 15:30:27 +053032 * @throws IOException when fails to translate the data model tree
Bharat saraswal870c56f2016-02-20 21:57:16 +053033 */
janani bde4ffab2016-04-15 16:18:30 +053034 void generateCodeEntry(YangPluginConfig yangPlugin) throws IOException;
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 *
39 * @throws IOException when fails to generate java code
40 */
41 void generateCodeExit() throws IOException;
42
Bharat saraswal870c56f2016-02-20 21:57:16 +053043}