FileDocCategorySizeDatePackage
CorbaResourceUtil.javaAPI DocJava SE 5 API2175Fri Aug 26 14:54:28 BST 2005com.sun.corba.se.impl.orbutil

CorbaResourceUtil

public class CorbaResourceUtil extends Object

Fields Summary
private static boolean
resourcesInitialized
private static ResourceBundle
resources
Constructors Summary
Methods Summary
public static java.lang.StringgetString(java.lang.String key)

        if (!resourcesInitialized) {
            initResources();
        }

        try {
            return resources.getString(key);
        } catch (MissingResourceException ignore) {
        }
        return null;
    
public static java.lang.StringgetText(java.lang.String key)

        String message = getString(key);
        if (message == null) {
            message = "no text found: \"" + key + "\"";
        }
        return message;
    
public static java.lang.StringgetText(java.lang.String key, int num)

	return getText(key, Integer.toString(num), null, null);
    
public static java.lang.StringgetText(java.lang.String key, java.lang.String arg0)

	return getText(key, arg0, null, null);
    
public static java.lang.StringgetText(java.lang.String key, java.lang.String arg0, java.lang.String arg1)

	return getText(key, arg0, arg1, null);
    
public static java.lang.StringgetText(java.lang.String key, java.lang.String arg0, java.lang.String arg1, java.lang.String arg2)

	String format = getString(key);
	if (format == null) {
	    format = "no text found: key = \"" + key + "\", " +
		"arguments = \"{0}\", \"{1}\", \"{2}\"";
	}

	String[] args = new String[3];
	args[0] = (arg0 != null ? arg0.toString() : "null");
	args[1] = (arg1 != null ? arg1.toString() : "null");
	args[2] = (arg2 != null ? arg2.toString() : "null");

	return java.text.MessageFormat.format(format, args);
    
private static voidinitResources()


        
        try {
            resources =
                ResourceBundle.getBundle("com.sun.corba.se.impl.orbutil.resources.sunorb");
            resourcesInitialized = true;
        } catch (MissingResourceException e) {
            throw new Error("fatal: missing resource bundle: " +
                            e.getClassName());
        }