103a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta/* 203a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * Copyright (C) 2013 The Android Open Source Project 303a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * 403a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * Licensed under the Apache License, Version 2.0 (the "License"); 503a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * you may not use this file except in compliance with the License. 603a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * You may obtain a copy of the License at 703a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * 803a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * http://www.apache.org/licenses/LICENSE-2.0 903a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * 1003a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * Unless required by applicable law or agreed to in writing, software 1103a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * distributed under the License is distributed on an "AS IS" BASIS, 1203a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1303a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * See the License for the specific language governing permissions and 1403a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * limitations under the License. 1503a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta */ 1603a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta 1703a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Guptapackage com.android.tools.layoutlib.java; 1803a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta 1903a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta/** 2003a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * Defines the same interface as the java.lang.AutoCloseable which was added in 2103a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * Java 7. This hack makes it possible to run the Android code which uses Java 7 2203a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * features (API 18 and beyond) to run on Java 6. 2303a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * <p/> 2403a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * Extracted from API level 18, file: 2503a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * platform/libcore/luni/src/main/java/java/lang/AutoCloseable.java 2603a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta */ 2703a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Guptapublic interface AutoCloseable { 2803a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta /** 2903a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta * Closes the object and release any system resources it holds. 3003a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta */ 3103a057c1af9ca3f125c7924bf0b78da52223d8d3Deepanshu Gupta void close() throws Exception; } 32