553N/A * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 553N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 553N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 553N/A * or visit www.oracle.com if you need additional information or have any 0N/A * An abstraction for generating support files required by native methods. 0N/A * Subclasses are for specific native interfaces. At the time of its 0N/A * original writing, this interface is rich enough to support JNI and the 0N/A * old 1.0-style native method interface. 580N/A * <p><b>This is NOT part of any supported API. 415N/A * If you write code that depends on this, you do so at your own 415N/A * risk. This code and its internal interfaces are subject to change 415N/A * or deletion without notice.</b></p> 0N/A * @author Sucheta Dambalkar(Revised) 0N/A * List of classes for which we must generate output. 0N/A * Override this abstract method, generating content for the named 0N/A * class into the outputstream. 0N/A * Override this method to provide a list of #include statements 0N/A * required by the native interface. 0N/A * Smartness with generated files. 0N/A * We explicitly need to write ASCII files because that is what C 0N/A * compilers understand. 0N/A * After initializing state of an instance, use this method to start 0N/A * Buffer size chosen as an approximation from a single sampling of: 0N/A * expr `du -sk` / `ls *.h | wc -l` 0N/A /* Everything goes to one big file... */ 0N/A /* Each class goes to its own file... */ 0N/A * Write the contents of byte[] b to a file named file. Writing 0N/A * is done if either the file doesn't exist or if the contents are 415N/A // regrettably, there's no API to get the length in bytes 415N/A // for a FileObject, so we can't short-circuit reading the 415N/A /* covers byte, short, int */ 0N/A // Visual C++ supports the i64 suffix, not LL. 0N/A * Deal with the C pre-processor. 0N/A * File name and file preamble related operations. 0N/A * Including super classes' fields. 415N/A // c.f. MethodDoc.signature