2362N/A * Copyright (c) 1999, 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 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/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. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * COMPONENT_NAME: idl.parser 0N/A * Licensed Materials - Property of IBM 0N/A * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999 0N/A// -capitalize and parseTypeModifier should probably be in the 0N/A// generators package. 0N/A// -D58319<daz> Add version() method. 0N/A// -D62023<daz> Add absDelta() method to support float computations. 0N/A * Fetch the version number of this build of the IDL Parser Framework 0N/A * from the appropriate properties file. 0N/A * @return the version number contained within the appropriate properties 0N/A * file, which indicates the build of this IDL Parser Framework. 0N/A * Fetch the version number of this build of the IDL Parser Framework. 0N/A * This method may be called before or after the framework has been 0N/A * initialized. If the framework is inititialized, the version information 0N/A * is extracted from the message properties object; otherwise, it is extracted 0N/A * from the indicated messages file. 0N/A * @return the version number. // Distinguish "string" because the name could be something like: // If it is null then it may be of the form string(<exp>). // Don't just check for string because the name "string" may // Message-related methods findFile is no longer used now that FileLocator has been provided by Larry Raper of the Shasta team. static File findFile (String name) throws FileNotFoundException String classpath = System.getProperty ("java.class.path"); String separator = System.getProperty ("path.separator"); int end = -separator.length (); // so the first pass classpath == original classpath classpath = classpath.substring (end + separator.length ()); end = classpath.indexOf (separator); if (end < 0) end = classpath.length (); file = new File (classpath.substring (0, end) + File.separator + "com" + File.separator + "ibm" + File.separator + "idl" + File.separator + name); } while (!file.exists () && end != classpath.length ()); if (!file.exists ()) throw new FileNotFoundException (); /** Register a message file. This file will be searched for // Message-related methods /** Searches the current user directory and a list of directories for a given short file name and returns its absolute file specification. @return Absolute file name of a given short filename @throws FileNotFoundException The file does not exist in the current user or specified directories. @see java.io.File.getAbsolutePath */ * Compute the absolute value of the difference between two floating-point * numbers having single precision. * @return the absolute value of the difference between two floats.