Package com.sun.tools.corba.ee.idl
Class Util
java.lang.Object
com.sun.tools.corba.ee.idl.Util
- Direct Known Subclasses:
Util
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static String
(package private) static RepositoryID
private static Properties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic float
absDelta
(float f1, float f2) Compute the absolute value of the difference between two floating-point numbers having single precision.static String
capitalize
(String lc) static String
getAbsolutePath
(String filename, Vector<String> includePaths) Searches the current user directory and a list of directories for a given short file name and returns its absolute file specification.private static String
getDefaultMessage
(String keyNotFound) static String
getMessage
(String key) static String
getMessage
(String key, String fill) static String
getMessage
(String key, String[] fill) static String
Fetch the version number of this build of the IDL Parser Framework from the appropriate properties file.protected static String
getVersion
(String filename) Fetch the version number of this build of the IDL Parser Framework.static boolean
isAttribute
(String name, Hashtable symbolTable) static boolean
static boolean
static boolean
isException
(String name, Hashtable symbolTable) static boolean
isInterface
(String name, Hashtable symbolTable) static boolean
static boolean
static boolean
isParameter
(String name, Hashtable symbolTable) static boolean
isPrimitive
(String name, Hashtable symbolTable) static boolean
isSequence
(String name, Hashtable symbolTable) static boolean
static boolean
static boolean
static boolean
private static void
loadMessages
(String msgResource) private static void
static void
registerMessageResource
(String resourceName) Register a message resource.
-
Field Details
-
DEFAULT_MESSAGE_RESOURCE
- See Also:
-
messages
-
defaultKey
-
msgResources
-
emptyID
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
getVersion
Fetch the version number of this build of the IDL Parser Framework from the appropriate properties file.- Returns:
- the version number contained within the appropriate properties file, which indicates the build of this IDL Parser Framework.
-
getVersion
Fetch the version number of this build of the IDL Parser Framework. This method may be called before or after the framework has been initialized. If the framework is initialized, the version information is extracted from the message properties object; otherwise, it is extracted from the indicated messages file.- Parameters:
filename
- name of file to get version number of- Returns:
- the version number.
-
isAttribute
-
isConst
-
isEnum
-
isException
-
isInterface
-
isMethod
-
isModule
-
isParameter
-
isPrimitive
-
isSequence
-
isStruct
-
isString
-
isTypedef
-
isUnion
-
getMessage
-
getMessage
-
getMessage
-
getDefaultMessage
-
readMessages
private static void readMessages() -
loadMessages
-
registerMessageResource
Register a message resource. This resource will be searched for in the CLASSPATH.- Parameters:
resourceName
- new resource name to add
-
capitalize
-
getAbsolutePath
public static String getAbsolutePath(String filename, Vector<String> includePaths) throws FileNotFoundException Searches the current user directory and a list of directories for a given short file name and returns its absolute file specification.- Parameters:
filename
- file to get absolute path ofincludePaths
- a Vector of paths to look for the file- Returns:
- Absolute file name of a given short filename
- Throws:
FileNotFoundException
- The file does not exist in the current user or specified directories.- See Also:
-
absDelta
public static float absDelta(float f1, float f2) Compute the absolute value of the difference between two floating-point numbers having single precision.- Parameters:
f1
- first floating-point numberf2
- second floating-point number- Returns:
- the absolute value of the difference between two floats.
-