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 Stringprivate static String(package private) static RepositoryIDprivate static Properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic floatabsDelta(float f1, float f2) Compute the absolute value of the difference between two floating-point numbers having single precision.static Stringcapitalize(String lc) static StringgetAbsolutePath(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 StringgetDefaultMessage(String keyNotFound) static StringgetMessage(String key) static StringgetMessage(String key, String fill) static StringgetMessage(String key, String[] fill) static StringFetch the version number of this build of the IDL Parser Framework from the appropriate properties file.protected static StringgetVersion(String filename) Fetch the version number of this build of the IDL Parser Framework.static booleanisAttribute(String name, Hashtable symbolTable) static booleanstatic booleanstatic booleanisException(String name, Hashtable symbolTable) static booleanisInterface(String name, Hashtable symbolTable) static booleanstatic booleanstatic booleanisParameter(String name, Hashtable symbolTable) static booleanisPrimitive(String name, Hashtable symbolTable) static booleanisSequence(String name, Hashtable symbolTable) static booleanstatic booleanstatic booleanstatic booleanprivate static voidloadMessages(String msgResource) private static voidstatic voidregisterMessageResource(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.
-