Home
last modified time | relevance | path

Searched refs:bundle (Results 1 – 14 of 14) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DResourceBundleTest.java44 ResourceBundle bundle = ResourceBundle.getBundle(name); in test_getBaseName() local
45 assertEquals(name, bundle.getBaseBundleName()); in test_getBaseName()
47 bundle = ResourceBundle.getBundle(name, Locale.getDefault()); in test_getBaseName()
48 assertEquals(name, bundle.getBaseBundleName()); in test_getBaseName()
58 ResourceBundle bundle; in test_getBundleLjava_lang_StringLjava_util_Locale() local
63 bundle = ResourceBundle.getBundle(name, new Locale("fr", "FR", "VAR")); in test_getBundleLjava_lang_StringLjava_util_Locale()
64 assertEquals("Wrong bundle fr_FR_VAR", "frFRVARValue4", bundle.getString("parent4")); in test_getBundleLjava_lang_StringLjava_util_Locale()
66 bundle = ResourceBundle.getBundle(name, new Locale("fr", "FR", "v1")); in test_getBundleLjava_lang_StringLjava_util_Locale()
67 assertEquals("Wrong bundle fr_FR_v1", "frFRValue4", bundle.getString("parent4")); in test_getBundleLjava_lang_StringLjava_util_Locale()
69 bundle = ResourceBundle.getBundle(name, new Locale("fr", "US", "VAR")); in test_getBundleLjava_lang_StringLjava_util_Locale()
[all …]
DListResourceBundleTest.java31 ResourceBundle bundle; in test_getKeys() local
34 bundle = ResourceBundle.getBundle(name, new Locale("fr", "FR", "VAR")); in test_getKeys()
35 Enumeration<String> keys = bundle.getKeys(); in test_getKeys()
50 ListResourceBundle bundle; in test_handleGetObjectLjava_lang_String() local
53 bundle = (ListResourceBundle) ResourceBundle.getBundle(name, new Locale("fr", "FR", "VAR")); in test_handleGetObjectLjava_lang_String()
54 Enumeration keys = bundle.getKeys(); in test_handleGetObjectLjava_lang_String()
58 result.addElement(bundle.handleGetObject((String)keys.nextElement())); in test_handleGetObjectLjava_lang_String()
DSampleBundleClass.java28 private static ResourceBundle bundle; field in SampleBundleClass
37 bundle = ResourceBundle.getBundle("tests.api.simple.SampleBundleClass"); in SampleBundleClass()
40 bundle = null; in SampleBundleClass()
DControlTest.java457 ResourceBundle bundle = null; in test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ() local
473 bundle = control.newBundle(propertiesNameCopy, frFR, PROPERTIES, in test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ()
476 assertTrue(bundle.getClass() == PropertyResourceBundle.class); in test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ()
477 assertEquals("fr_FR_resource", bundle.getString("property")); in test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ()
479 PROPERTIES, URLLoader, bundle, time)); in test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ()
484 PROPERTIES, URLLoader, bundle, time)); in test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ()
487 PROPERTIES, URLLoader, bundle, time)); in test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ()
490 PROPERTIES, URLLoader, bundle, 2006L)); in test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ()
493 PROPERTIES, testCodeClassLoader, bundle, time)); in test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ()
502 PROPERTIES, URLLoader, bundle, System.currentTimeMillis())); in test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ()
[all …]
DPropertyResourceBundleTest.java177 protected void setParent(ResourceBundle bundle) { in test_access$0_Enumeration() argument
178 super.setParent(bundle); in test_access$0_Enumeration()
/libcore/ojluni/src/main/java/java/util/
DResourceBundle.java1666 ResourceBundle bundle = null; in getBundleImpl() local
1671 bundle = bundleRef.get(); in getBundleImpl()
1679 if (isValidBundle(bundle) && hasValidParentChain(bundle)) { in getBundleImpl()
1680 return bundle; in getBundleImpl()
1705 bundle = findBundle(cacheKey, candidateLocales, formats, 0, control, baseBundle); in getBundleImpl()
1712 if (isValidBundle(bundle)) { in getBundleImpl()
1713 boolean isBaseBundle = Locale.ROOT.equals(bundle.locale); in getBundleImpl()
1714 if (!isBaseBundle || bundle.locale.equals(locale) in getBundleImpl()
1716 && bundle.locale.equals(candidateLocales.get(0)))) { in getBundleImpl()
1724 baseBundle = bundle; in getBundleImpl()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DResourceBundleTest.java61 ResourceBundle bundle = ResourceBundle.getBundle(PROP_RESOURCE_NAME, propControl); in testGetBundle_withControl() local
62 assertEquals("parent", bundle.getString("property")); in testGetBundle_withControl()
74 bundle = ResourceBundle.getBundle(PROP_RESOURCE_NAME, locale, propControl); in testGetBundle_withControl()
75 assertEquals("parent", bundle.getString("property")); in testGetBundle_withControl()
87 bundle = ResourceBundle.getBundle(PROP_RESOURCE_NAME, locale, resClassLoader, propControl); in testGetBundle_withControl()
88 assertEquals("parent", bundle.getString("property")); in testGetBundle_withControl()
104 ResourceBundle bundle = ResourceBundle.getBundle(PROP_RESOURCE_NAME); in testContainsKey() local
105 assertTrue(bundle.containsKey("property")); in testContainsKey()
106 assertFalse(bundle.containsKey("anotherProperty")); in testContainsKey()
/libcore/ojluni/src/main/java/sun/security/util/
DResourcesMgr.java33 private static java.util.ResourceBundle bundle; field in ResourcesMgr
40 if (bundle == null) { in getString()
43 bundle = java.security.AccessController.doPrivileged( in getString()
52 return bundle.getString(s); in getString()
/libcore/ojluni/src/main/java/java/util/logging/
DLogger.java228 private LoggerBundle(String resourceBundleName, ResourceBundle bundle) { in LoggerBundle() argument
230 this.userBundle = bundle; in LoggerBundle()
235 static LoggerBundle get(String name, ResourceBundle bundle) { in get() argument
236 if (name == null && bundle == null) { in get()
238 } else if (SYSTEM_LOGGER_RB_NAME.equals(name) && bundle == null) { in get()
241 return new LoggerBundle(name, bundle); in get()
759 final ResourceBundle bundle = lb.userBundle; in doLog() local
761 if (ebname != null && bundle != null) { in doLog()
763 lr.setResourceBundle(bundle); in doLog()
1235 ResourceBundle bundle, String msg, Object... params) { in logrb() argument
[all …]
DLogRecord.java224 public void setResourceBundle(ResourceBundle bundle) { in setResourceBundle() argument
225 resourceBundle = bundle; in setResourceBundle()
525 final ResourceBundle bundle = in readObject() local
529 resourceBundle = bundle; in readObject()
DXMLFormatter.java163 ResourceBundle bundle = record.getResourceBundle(); in format() local
165 if (bundle != null && bundle.getString(record.getMessage()) != null) { in format()
/libcore/ojluni/annotations/hiddenapi/sun/security/util/
DResourcesMgr.java46 private static java.util.ResourceBundle bundle; field in ResourcesMgr
/libcore/ojluni/annotations/hiddenapi/java/util/logging/
DLogger.java247 java.util.ResourceBundle bundle, in logrb() argument
268 java.util.ResourceBundle bundle, in logrb() argument
421 public void setResourceBundle(java.util.ResourceBundle bundle) { in setResourceBundle() argument
533 private LoggerBundle(java.lang.String resourceBundleName, java.util.ResourceBundle bundle) { in LoggerBundle() argument
542 java.lang.String name, java.util.ResourceBundle bundle) { in get() argument
/libcore/ojluni/annotations/sdk/nullability/java/util/logging/
DLogger.annotated.java93 …ang.String sourceMethod, @libcore.util.Nullable java.util.ResourceBundle bundle, @libcore.util.Nul… in logrb() argument
98 …ang.String sourceMethod, @libcore.util.Nullable java.util.ResourceBundle bundle, @libcore.util.Nul… in logrb() argument
158 public void setResourceBundle(@libcore.util.NonNull java.util.ResourceBundle bundle) { throw new Ru… in setResourceBundle() argument