blob: 1327e12f79b2292f35eb7666c728edf83c952fc3 [file] [log] [blame]
Vinod Kumar S67e7be62016-02-11 20:13:28 +05301/*Copyright 2016.year Open Networking Laboratory
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.*/
14package org.onosproject.yangutils.utils.io;
15
16import org.onosproject.yangutils.translator.GeneratedFileType;
17
18/**
19 * Cached java file handle, which supports the addition of member attributes and
20 * methods.
21 */
22public interface CachedFileHandle {
23
24 /**
25 * Add a new attribute to the file(s).
26 *
27 * @param attrType data type of the added attribute.
28 * @param name name of the attribute.
29 * @param isListAttr if the current added attribute needs to be maintained
30 * in a list.
31 * @param fileTypes types of files in which the attribute needs to be added.
32 */
33 void addAttributeInfo(String attrType, String name, boolean isListAttr, GeneratedFileType fileTypes);
34
35 /**
36 * Flushes the cached contents to the target file, frees used resources.
37 */
38 void close();
39}