-
Notifications
You must be signed in to change notification settings - Fork 0
/
ResourceBundle.xml
1417 lines (1401 loc) · 91.3 KB
/
ResourceBundle.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Type Name="ResourceBundle" FullName="Java.Util.ResourceBundle">
<TypeSignature Language="C#" Value="public abstract class ResourceBundle : Java.Lang.Object" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit ResourceBundle extends Java.Lang.Object" />
<TypeSignature Language="DocId" Value="T:Java.Util.ResourceBundle" />
<TypeSignature Language="F#" Value="type ResourceBundle = class
 inherit Object" />
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Java.Lang.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("java/util/ResourceBundle", DoNotGenerateAcw=true)]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("java/util/ResourceBundle", DoNotGenerateAcw=true)>]</AttributeName>
</Attribute>
</Attributes>
<Docs since="1">
<summary>Resource bundles contain locale-specific objects.</summary>
<remarks>
<para>Resource bundles contain locale-specific objects. When your program needs a
locale-specific resource, a <c>String</c> for example, your program can
load it from the resource bundle that is appropriate for the current user's
locale. In this way, you can write program code that is largely independent
of the user's locale isolating most, if not all, of the locale-specific
information in resource bundles.</para>
<para>This allows you to write programs that can:
<UL>
<LI> be easily localized, or translated, into different languages
<LI> handle multiple locales at once
<LI> be easily modified later to support even more locales
</UL></para>
<para>Resource bundles belong to families whose members share a common base
name, but whose names also have additional components that identify
their locales. For example, the base name of a family of resource
bundles might be "MyResources". The family should have a default
resource bundle which simply has the same name as its family -
"MyResources" - and will be used as the bundle of last resort if a
specific locale is not supported. The family can then provide as
many locale-specific members as needed, for example a German one
named "MyResources_de".</para>
<para>Each resource bundle in a family contains the same items, but the items have
been translated for the locale represented by that resource bundle.
For example, both "MyResources" and "MyResources_de" may have a
<c>String</c> that's used on a button for canceling operations.
In "MyResources" the <c>String</c> may contain "Cancel" and in
"MyResources_de" it may contain "Abbrechen".</para>
<para>If there are different resources for different countries, you
can make specializations: for example, "MyResources_de_CH" contains objects for
the German language (de) in Switzerland (CH). If you want to only
modify some of the resources
in the specialization, you can do so.</para>
<para>When your program needs a locale-specific object, it loads
the <c>ResourceBundle</c> class using the
<c>#getBundle(java.lang.String, java.util.Locale) getBundle</c>
method:
<blockquote></para>
<code lang="text/java">ResourceBundle myResources =
ResourceBundle.getBundle("MyResources", currentLocale);
</code>
<para></blockquote></para>
<para>Resource bundles contain key/value pairs. The keys uniquely
identify a locale-specific object in the bundle. Here's an
example of a <c>ListResourceBundle</c> that contains
two key/value pairs:
<blockquote></para>
<code lang="text/java">public class MyResources extends ListResourceBundle {
protected Object[][] getContents() {
return new Object[][] {
// LOCALIZE THE SECOND STRING OF EACH ARRAY (e.g., "OK")
{"OkKey", "OK"},
{"CancelKey", "Cancel"},
// END OF MATERIAL TO LOCALIZE
};
}
}
</code>
<para></blockquote>
Keys are always <c>String</c>s.
In this example, the keys are "OkKey" and "CancelKey".
In the above example, the values
are also <c>String</c>s--"OK" and "Cancel"--but
they don't have to be. The values can be any type of object.</para>
<para>You retrieve an object from resource bundle using the appropriate
getter method. Because "OkKey" and "CancelKey"
are both strings, you would use <c>getString</c> to retrieve them:
<blockquote></para>
<code lang="text/java">button1 = new Button(myResources.getString("OkKey"));
button2 = new Button(myResources.getString("CancelKey"));
</code>
<para></blockquote>
The getter methods all require the key as an argument and return
the object if found. If the object is not found, the getter method
throws a <c>MissingResourceException</c>.</para>
<para>Besides <c>getString</c>, <c>ResourceBundle</c> also provides
a method for getting string arrays, <c>getStringArray</c>,
as well as a generic <c>getObject</c> method for any other
type of object. When using <c>getObject</c>, you'll
have to cast the result to the appropriate type. For example:
<blockquote></para>
<code lang="text/java">int[] myIntegers = (int[]) myResources.getObject("intList");
</code>
<para></blockquote></para>
<para>The Java Platform provides two subclasses of <c>ResourceBundle</c>,
<c>ListResourceBundle</c> and <c>PropertyResourceBundle</c>,
that provide a fairly simple way to create resources.
As you saw briefly in a previous example, <c>ListResourceBundle</c>
manages its resource as a list of key/value pairs.
<c>PropertyResourceBundle</c> uses a properties file to manage
its resources.</para>
<para>If <c>ListResourceBundle</c> or <c>PropertyResourceBundle</c>
do not suit your needs, you can write your own <c>ResourceBundle</c>
subclass. Your subclasses must override two methods: <c>handleGetObject</c>
and <c>getKeys()</c>.</para>
<para>The implementation of a <c>ResourceBundle</c> subclass must be thread-safe
if it's simultaneously used by multiple threads. The default implementations
of the non-abstract methods in this class, and the methods in the direct
known concrete subclasses <c>ListResourceBundle</c> and
<c>PropertyResourceBundle</c> are thread-safe.
<h3>ResourceBundle.Control</h3>
The <c>ResourceBundle.Control</c> class provides information necessary
to perform the bundle loading process by the <c>getBundle</c>
factory methods that take a <c>ResourceBundle.Control</c>
instance. You can implement your own subclass in order to enable
non-standard resource bundle formats, change the search strategy, or
define caching parameters. Refer to the descriptions of the class and the
<c>#getBundle(String, Locale, ClassLoader, Control) getBundle</c>
factory method for details.
<h3>Cache Management</h3>
Resource bundle instances created by the <c>getBundle</c> factory
methods are cached by default, and the factory methods return the same
resource bundle instance multiple times if it has been
cached. <c>getBundle</c> clients may clear the cache, manage the
lifetime of cached resource bundle instances using time-to-live values,
or specify not to cache resource bundle instances. Refer to the
descriptions of the #getBundle(String, Locale, ClassLoader,
Control) <code>getBundle</code> factory method, <c>#clearCache(ClassLoader) clearCache</c>, <c>Control#getTimeToLive(String, Locale)
ResourceBundle.Control.getTimeToLive</c>, and <c>Control#needsReload(String, Locale, String, ClassLoader, ResourceBundle,
long) ResourceBundle.Control.needsReload</c> for details.
<h3>Example</h3>
The following is a very simple example of a <c>ResourceBundle</c>
subclass, <c>MyResources</c>, that manages two resources (for a larger number of
resources you would probably use a <c>Map</c>).
Notice that you don't need to supply a value if
a "parent-level" <c>ResourceBundle</c> handles the same
key with the same value (as for the okKey below).
<blockquote></para>
<code lang="text/java">// default (English language, United States)
public class MyResources extends ResourceBundle {
public Object handleGetObject(String key) {
if (key.equals("okKey")) return "Ok";
if (key.equals("cancelKey")) return "Cancel";
return null;
}
public Enumeration&lt;String&gt; getKeys() {
return Collections.enumeration(keySet());
}
// Overrides handleKeySet() so that the getKeys() implementation
// can rely on the keySet() value.
protected Set&lt;String&gt; handleKeySet() {
return new HashSet&lt;String&gt;(Arrays.asList("okKey", "cancelKey"));
}
}
// German language
public class MyResources_de extends MyResources {
public Object handleGetObject(String key) {
// don't need okKey, since parent level handles it.
if (key.equals("cancelKey")) return "Abbrechen";
return null;
}
protected Set&lt;String&gt; handleKeySet() {
return new HashSet&lt;String&gt;(Arrays.asList("cancelKey"));
}
}
</code>
<para></blockquote>
You do not have to restrict yourself to using a single family of
<c>ResourceBundle</c>s. For example, you could have a set of bundles for
exception messages, <c>ExceptionResources</c>
(<c>ExceptionResources_fr</c>, <c>ExceptionResources_de</c>, ...),
and one for widgets, <c>WidgetResource</c> (<c>WidgetResources_fr</c>,
<c>WidgetResources_de</c>, ...); breaking up the resources however you like.</para>
<para>Added in 1.1.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ResourceBundle ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.#ctor" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register(".ctor", "()V", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register(".ctor", "()V", "")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Sole constructor.</summary>
<remarks>
<para>Sole constructor. (For invocation by subclass constructors, typically
implicit.)</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#ResourceBundle()" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.ResourceBundle()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected ResourceBundle (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(native int javaReference, valuetype Android.Runtime.JniHandleOwnership transfer) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.#ctor(System.IntPtr,Android.Runtime.JniHandleOwnership)" />
<MemberSignature Language="F#" Value="new Java.Util.ResourceBundle : nativeint * Android.Runtime.JniHandleOwnership -> Java.Util.ResourceBundle" Usage="new Java.Util.ResourceBundle (javaReference, transfer)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="javaReference" Type="System.IntPtr" />
<Parameter Name="transfer" Type="Android.Runtime.JniHandleOwnership" />
</Parameters>
<Docs>
<param name="javaReference">A <see cref="T:System.IntPtr" />containing a Java Native Interface (JNI) object reference.</param>
<param name="transfer">A <see cref="T:Android.Runtime.JniHandleOwnership" />indicating how to handle <paramref name="javaReference" /></param>
<summary>A constructor used when creating managed representations of JNI objects; called by the runtime.</summary>
<remarks>
<para>Portions of this page are modifications based on work created and shared by the <format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format> and used according to terms described in the <format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="BaseBundleName">
<MemberSignature Language="C#" Value="public virtual string? BaseBundleName { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string BaseBundleName" />
<MemberSignature Language="DocId" Value="P:Java.Util.ResourceBundle.BaseBundleName" />
<MemberSignature Language="F#" Value="member this.BaseBundleName : string" Usage="Java.Util.ResourceBundle.BaseBundleName" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Runtime.Versioning.SupportedOSPlatform("android26.0")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.Versioning.SupportedOSPlatform("android26.0")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[get: Android.Runtime.Register("getBaseBundleName", "()Ljava/lang/String;", "GetGetBaseBundleNameHandler", ApiSince=26)]</AttributeName>
<AttributeName Language="F#">[<get: Android.Runtime.Register("getBaseBundleName", "()Ljava/lang/String;", "GetGetBaseBundleNameHandler", ApiSince=26)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns the base name of this bundle, if known, or <c>null</c> if unknown.</summary>
<value>The base name of the resource bundle, as provided to and expected
by the <c>ResourceBundle.getBundle(...)</c> methods.</value>
<remarks>
<para>Returns the base name of this bundle, if known, or <c>null</c> if unknown.
If not null, then this is the value of the <c>baseName</c> parameter
that was passed to the <c>ResourceBundle.getBundle(...)</c> method
when the resource bundle was loaded.</para>
<para>Added in 1.8.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#getBaseBundleName()" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.getBaseBundleName()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="ClearCache">
<MemberSignature Language="C#" Value="public static void ClearCache ();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void ClearCache() cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.ClearCache" />
<MemberSignature Language="F#" Value="static member ClearCache : unit -> unit" Usage="Java.Util.ResourceBundle.ClearCache " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("clearCache", "()V", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("clearCache", "()V", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Removes all resource bundles from the cache that have been loaded
using the caller's class loader.</summary>
<remarks>
<para>Removes all resource bundles from the cache that have been loaded
using the caller's class loader.</para>
<para>Added in 1.6.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#clearCache()" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.clearCache()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 9" />
</Docs>
</Member>
<Member MemberName="ClearCache">
<MemberSignature Language="C#" Value="public static void ClearCache (Java.Lang.ClassLoader? loader);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void ClearCache(class Java.Lang.ClassLoader loader) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.ClearCache(Java.Lang.ClassLoader)" />
<MemberSignature Language="F#" Value="static member ClearCache : Java.Lang.ClassLoader -> unit" Usage="Java.Util.ResourceBundle.ClearCache loader" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("clearCache", "(Ljava/lang/ClassLoader;)V", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("clearCache", "(Ljava/lang/ClassLoader;)V", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="loader" Type="Java.Lang.ClassLoader" />
</Parameters>
<Docs>
<param name="loader">the class loader</param>
<summary>Removes all resource bundles from the cache that have been loaded
by the given class loader.</summary>
<remarks>
<para>Removes all resource bundles from the cache that have been loaded
by the given class loader.</para>
<para>Added in 1.6.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#clearCache(java.lang.ClassLoader)" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.clearCache(java.lang.ClassLoader)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 9" />
</Docs>
</Member>
<Member MemberName="ContainsKey">
<MemberSignature Language="C#" Value="public virtual bool ContainsKey (string? key);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool ContainsKey(string key) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.ContainsKey(System.String)" />
<MemberSignature Language="F#" Value="abstract member ContainsKey : string -> bool
override this.ContainsKey : string -> bool" Usage="resourceBundle.ContainsKey key" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("containsKey", "(Ljava/lang/String;)Z", "GetContainsKey_Ljava_lang_String_Handler")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("containsKey", "(Ljava/lang/String;)Z", "GetContainsKey_Ljava_lang_String_Handler")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
</Parameters>
<Docs>
<param name="key">the resource <c>key</c></param>
<summary>Determines whether the given <c>key</c> is contained in
this <c>ResourceBundle</c> or its parent bundles.</summary>
<returns>
<c>true</c> if the given <c>key</c> is
contained in this <c>ResourceBundle</c> or its
parent bundles; <c>false</c> otherwise.</returns>
<remarks>
<para>Determines whether the given <c>key</c> is contained in
this <c>ResourceBundle</c> or its parent bundles.</para>
<para>Added in 1.6.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#containsKey(java.lang.String)" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.containsKey(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 9" />
</Docs>
</Member>
<Member MemberName="GetBundle">
<MemberSignature Language="C#" Value="public static Java.Util.ResourceBundle? GetBundle (string? baseName);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Java.Util.ResourceBundle GetBundle(string baseName) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.GetBundle(System.String)" />
<MemberSignature Language="F#" Value="static member GetBundle : string -> Java.Util.ResourceBundle" Usage="Java.Util.ResourceBundle.GetBundle baseName" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("getBundle", "(Ljava/lang/String;)Ljava/util/ResourceBundle;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("getBundle", "(Ljava/lang/String;)Ljava/util/ResourceBundle;", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Util.ResourceBundle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseName" Type="System.String" />
</Parameters>
<Docs>
<param name="baseName">the base name of the resource bundle, a fully qualified class name</param>
<summary>Gets a resource bundle using the specified base name, the default locale,
and the caller's class loader.</summary>
<returns>a resource bundle for the given base name and the default locale</returns>
<remarks>
<para>Gets a resource bundle using the specified base name, the default locale,
and the caller's class loader. Calling this method is equivalent to calling
<blockquote>
<c>getBundle(baseName, Locale.getDefault(), this.getClass().getClassLoader())</c>,
</blockquote></para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#getBundle(java.lang.String)" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.getBundle(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Util.MissingResourceException">if the <c>ResourceBundle</c> cannot be found.
</exception>
</Docs>
</Member>
<Member MemberName="GetBundle">
<MemberSignature Language="C#" Value="public static Java.Util.ResourceBundle? GetBundle (string? baseName, Java.Util.Locale? locale);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Java.Util.ResourceBundle GetBundle(string baseName, class Java.Util.Locale locale) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.GetBundle(System.String,Java.Util.Locale)" />
<MemberSignature Language="F#" Value="static member GetBundle : string * Java.Util.Locale -> Java.Util.ResourceBundle" Usage="Java.Util.ResourceBundle.GetBundle (baseName, locale)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("getBundle", "(Ljava/lang/String;Ljava/util/Locale;)Ljava/util/ResourceBundle;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("getBundle", "(Ljava/lang/String;Ljava/util/Locale;)Ljava/util/ResourceBundle;", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Util.ResourceBundle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseName" Type="System.String" />
<Parameter Name="locale" Type="Java.Util.Locale" />
</Parameters>
<Docs>
<param name="baseName">the base name of the resource bundle, a fully qualified class name</param>
<param name="locale">the locale for which a resource bundle is desired</param>
<summary>Gets a resource bundle using the specified base name and locale,
and the caller's class loader.</summary>
<returns>a resource bundle for the given base name and locale</returns>
<remarks>
<para>Gets a resource bundle using the specified base name and locale,
and the caller's class loader. Calling this method is equivalent to calling
<blockquote>
<c>getBundle(baseName, locale, this.getClass().getClassLoader())</c>,
</blockquote></para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#getBundle(java.lang.String,%20java.util.Locale)" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.getBundle(java.lang.String, java.util.Locale)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Util.MissingResourceException">if the resource bundle cannot be found.
</exception>
</Docs>
</Member>
<Member MemberName="GetBundle">
<MemberSignature Language="C#" Value="public static Java.Util.ResourceBundle? GetBundle (string? baseName, Java.Util.ResourceBundle.Control? control);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Java.Util.ResourceBundle GetBundle(string baseName, class Java.Util.ResourceBundle/Control control) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.GetBundle(System.String,Java.Util.ResourceBundle.Control)" />
<MemberSignature Language="F#" Value="static member GetBundle : string * Java.Util.ResourceBundle.Control -> Java.Util.ResourceBundle" Usage="Java.Util.ResourceBundle.GetBundle (baseName, control)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("getBundle", "(Ljava/lang/String;Ljava/util/ResourceBundle$Control;)Ljava/util/ResourceBundle;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("getBundle", "(Ljava/lang/String;Ljava/util/ResourceBundle$Control;)Ljava/util/ResourceBundle;", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Util.ResourceBundle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseName" Type="System.String" />
<Parameter Name="control" Type="Java.Util.ResourceBundle+Control" />
</Parameters>
<Docs>
<param name="baseName">the base name of the resource bundle, a fully qualified class name</param>
<param name="control">the control that control the access sequence</param>
<summary>Gets a resource bundle using the specified base name, the default locale,
and the caller's class loader.</summary>
<returns>a resource bundle for the given base name and the default locale</returns>
<remarks>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#getBundle(java.lang.String)" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.getBundle(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 9" />
</Docs>
</Member>
<Member MemberName="GetBundle">
<MemberSignature Language="C#" Value="public static Java.Util.ResourceBundle? GetBundle (string? baseName, Java.Util.Locale? locale, Java.Lang.ClassLoader? loader);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Java.Util.ResourceBundle GetBundle(string baseName, class Java.Util.Locale locale, class Java.Lang.ClassLoader loader) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.GetBundle(System.String,Java.Util.Locale,Java.Lang.ClassLoader)" />
<MemberSignature Language="F#" Value="static member GetBundle : string * Java.Util.Locale * Java.Lang.ClassLoader -> Java.Util.ResourceBundle" Usage="Java.Util.ResourceBundle.GetBundle (baseName, locale, loader)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("getBundle", "(Ljava/lang/String;Ljava/util/Locale;Ljava/lang/ClassLoader;)Ljava/util/ResourceBundle;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("getBundle", "(Ljava/lang/String;Ljava/util/Locale;Ljava/lang/ClassLoader;)Ljava/util/ResourceBundle;", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Util.ResourceBundle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseName" Type="System.String" />
<Parameter Name="locale" Type="Java.Util.Locale" />
<Parameter Name="loader" Type="Java.Lang.ClassLoader" />
</Parameters>
<Docs>
<param name="baseName">the base name of the resource bundle, a fully qualified class name</param>
<param name="locale">the locale for which a resource bundle is desired</param>
<param name="loader">the class loader from which to load the resource bundle</param>
<summary>Gets a resource bundle using the specified base name, locale, and class
loader.</summary>
<returns>a resource bundle for the given base name and locale</returns>
<remarks>
<para>Gets a resource bundle using the specified base name, locale, and class
loader.
This is equivalent to calling:
<blockquote></para>
<code lang="text/java">getBundle(baseName, targetLocale, loader, control)
</code>
<para></blockquote>
passing a default instance of <c>Control</c>.
Refer to the
description of modifying the default
behavior. The following describes the default behavior.</para>
<para><b>"default_behavior">Resource Bundle Search and Loading Strategy</b></para>
<para>
<c>getBundle</c> uses the base name, the specified locale, and
the default locale (obtained from <c>java.util.Locale#getDefault()
Locale.getDefault</c>) to generate a sequence of "candidates"><em>candidate bundle names</em>. If the specified
locale's language, script, country, and variant are all empty strings,
then the base name is the only candidate bundle name. Otherwise, a list
of candidate locales is generated from the attribute values of the
specified locale (language, script, country and variant) and appended to
the base name. Typically, this will look like the following:</para>
<code lang="text/java">baseName + "_" + language + "_" + script + "_" + country + "_" + variant
baseName + "_" + language + "_" + script + "_" + country
baseName + "_" + language + "_" + script
baseName + "_" + language + "_" + country + "_" + variant
baseName + "_" + language + "_" + country
baseName + "_" + language
</code>
<para>Candidate bundle names where the final component is an empty string
are omitted, along with the underscore. For example, if country is an
empty string, the second and the fifth candidate bundle names above
would be omitted. Also, if script is an empty string, the candidate names
including script are omitted. For example, a locale with language "de"
and variant "JAVA" will produce candidate names with base name
"MyResource" below.</para>
<code lang="text/java">MyResource_de__JAVA
MyResource_de
</code>
<para>In the case that the variant contains one or more underscores ('_'), a
sequence of bundle names generated by truncating the last underscore and
the part following it is inserted after a candidate bundle name with the
original variant. For example, for a locale with language "en", script
"Latn, country "US" and variant "WINDOWS_VISTA", and bundle base name
"MyResource", the list of candidate bundle names below is generated:</para>
<code lang="text/java">MyResource_en_Latn_US_WINDOWS_VISTA
MyResource_en_Latn_US_WINDOWS
MyResource_en_Latn_US
MyResource_en_Latn
MyResource_en_US_WINDOWS_VISTA
MyResource_en_US_WINDOWS
MyResource_en_US
MyResource_en
</code>
<para><blockquote><b>Note:</b> For some <c>Locale</c>s, the list of
candidate bundle names contains extra names, or the order of bundle names
is slightly modified. See the description of the default implementation
of <c>Control#getCandidateLocales(String, Locale)
getCandidateLocales</c> for details.</blockquote></para>
<para>
<c>getBundle</c> then iterates over the candidate bundle names
to find the first one for which it can <em>instantiate</em> an actual
resource bundle. It uses the default controls' <c>Control#getFormats
getFormats</c> method, which generates two bundle names for each generated
name, the first a class name and the second a properties file name. For
each candidate bundle name, it attempts to create a resource bundle:
<ul><li>First, it attempts to load a class using the generated class name.
If such a class can be found and loaded using the specified class
loader, is assignment compatible with ResourceBundle, is accessible from
ResourceBundle, and can be instantiated, <c>getBundle</c> creates a
new instance of this class and uses it as the <em>result resource
bundle</em>.
<li>Otherwise, <c>getBundle</c> attempts to locate a property
resource file using the generated properties file name. It generates a
path name from the candidate bundle name by replacing all "." characters
with "/" and appending the string ".properties". It attempts to find a
"resource" with this name using <c>java.lang.ClassLoader#getResource(java.lang.String)
ClassLoader.getResource</c>. (Note that a "resource" in the sense of
<c>getResource</c> has nothing to do with the contents of a
resource bundle, it is just a container of data, such as a file.) If it
finds a "resource", it attempts to create a new <c>PropertyResourceBundle</c> instance from its contents. If successful, this
instance becomes the <em>result resource bundle</em>. </ul></para>
<para>This continues until a result resource bundle is instantiated or the
list of candidate bundle names is exhausted. If no matching resource
bundle is found, the default control's <c>Control#getFallbackLocale
getFallbackLocale</c> method is called, which returns the current default
locale. A new sequence of candidate locale names is generated using this
locale and searched again, as above.</para>
<para>If still no result bundle is found, the base name alone is looked up. If
this still fails, a <c>MissingResourceException</c> is thrown.</para>
<para>"parent_chain"> Once a result resource bundle has been found,
its <em>parent chain</em> is instantiated. If the result bundle already
has a parent (perhaps because it was returned from a cache) the chain is
complete.</para>
<para>Otherwise, <c>getBundle</c> examines the remainder of the
candidate locale list that was used during the pass that generated the
result resource bundle. (As before, candidate bundle names where the
final component is an empty string are omitted.) When it comes to the
end of the candidate list, it tries the plain bundle name. With each of the
candidate bundle names it attempts to instantiate a resource bundle (first
looking for a class and then a properties file, as described above).</para>
<para>Whenever it succeeds, it calls the previously instantiated resource
bundle's <c>#setParent(java.util.ResourceBundle) setParent</c> method
with the new resource bundle. This continues until the list of names
is exhausted or the current bundle already has a non-null parent.</para>
<para>Once the parent chain is complete, the bundle is returned.</para>
<para><b>Note:</b> <c>getBundle</c> caches instantiated resource
bundles and might return the same resource bundle instance multiple times.</para>
<para><b>Note:</b>The <c>baseName</c> argument should be a fully
qualified class name. However, for compatibility with earlier versions,
Java SE Runtime Environments do not verify this, and so it is
possible to access <c>PropertyResourceBundle</c>s by specifying a
path name (using "/") instead of a fully qualified class name (using
".").</para>
<para>"default_behavior_example">
<strong>Example:</strong></para>
<para>The following class and property files are provided:
<ul>
<li>MyResources.class
<li>MyResources.properties
<li>MyResources_fr.properties
<li>MyResources_fr_CH.class
<li>MyResources_fr_CH.properties
<li>MyResources_en.properties
<li>MyResources_es_ES.class
</ul>
The contents of all files are valid (that is, public non-abstract
subclasses of <c>ResourceBundle</c> for the ".class" files,
syntactically correct ".properties" files). The default locale is
<c>Locale("en", "GB")</c>.</para>
<para>Calling <c>getBundle</c> with the locale arguments below will
instantiate resource bundles as follows:
<table class="striped">
<caption style="display:none">getBundle() locale to resource bundle mapping</caption>
<thead>
<tr><th scope="col">Locale</th><th scope="col">Resource bundle</th></tr>
</thead>
<tbody>
<tr><th scope="row">Locale("fr", "CH")</th><td>MyResources_fr_CH.class, parent MyResources_fr.properties, parent MyResources.class</td></tr>
<tr><th scope="row">Locale("fr", "FR")</th><td>MyResources_fr.properties, parent MyResources.class</td></tr>
<tr><th scope="row">Locale("de", "DE")</th><td>MyResources_en.properties, parent MyResources.class</td></tr>
<tr><th scope="row">Locale("en", "US")</th><td>MyResources_en.properties, parent MyResources.class</td></tr>
<tr><th scope="row">Locale("es", "ES")</th><td>MyResources_es_ES.class, parent MyResources.class</td></tr>
</tbody>
</table></para>
<para>The file MyResources_fr_CH.properties is never used because it is
hidden by the MyResources_fr_CH.class. Likewise, MyResources.properties
is also hidden by MyResources.class.</para>
<para>Added in 1.2.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Util.MissingResourceException">if the <c>ResourceBundle</c> cannot be found.
</exception>
</Docs>
</Member>
<Member MemberName="GetBundle">
<MemberSignature Language="C#" Value="public static Java.Util.ResourceBundle? GetBundle (string? baseName, Java.Util.Locale? targetLocale, Java.Util.ResourceBundle.Control? control);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Java.Util.ResourceBundle GetBundle(string baseName, class Java.Util.Locale targetLocale, class Java.Util.ResourceBundle/Control control) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.GetBundle(System.String,Java.Util.Locale,Java.Util.ResourceBundle.Control)" />
<MemberSignature Language="F#" Value="static member GetBundle : string * Java.Util.Locale * Java.Util.ResourceBundle.Control -> Java.Util.ResourceBundle" Usage="Java.Util.ResourceBundle.GetBundle (baseName, targetLocale, control)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("getBundle", "(Ljava/lang/String;Ljava/util/Locale;Ljava/util/ResourceBundle$Control;)Ljava/util/ResourceBundle;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("getBundle", "(Ljava/lang/String;Ljava/util/Locale;Ljava/util/ResourceBundle$Control;)Ljava/util/ResourceBundle;", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Util.ResourceBundle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseName" Type="System.String" />
<Parameter Name="targetLocale" Type="Java.Util.Locale" />
<Parameter Name="control" Type="Java.Util.ResourceBundle+Control" />
</Parameters>
<Docs>
<param name="baseName">the base name of the resource bundle, a fully qualified class name</param>
<param name="targetLocale">the target locale of the resource bundle</param>
<param name="control">the control that control the access sequence</param>
<summary>Gets a resource bundle using the specified base name, the default locale,
and the caller's class loader.</summary>
<returns>a resource bundle for the given base name and the default locale</returns>
<remarks>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#getBundle(java.lang.String)" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.getBundle(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 9" />
</Docs>
</Member>
<Member MemberName="GetBundle">
<MemberSignature Language="C#" Value="public static Java.Util.ResourceBundle? GetBundle (string? baseName, Java.Util.Locale? targetLocale, Java.Lang.ClassLoader? loader, Java.Util.ResourceBundle.Control? control);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Java.Util.ResourceBundle GetBundle(string baseName, class Java.Util.Locale targetLocale, class Java.Lang.ClassLoader loader, class Java.Util.ResourceBundle/Control control) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.GetBundle(System.String,Java.Util.Locale,Java.Lang.ClassLoader,Java.Util.ResourceBundle.Control)" />
<MemberSignature Language="F#" Value="static member GetBundle : string * Java.Util.Locale * Java.Lang.ClassLoader * Java.Util.ResourceBundle.Control -> Java.Util.ResourceBundle" Usage="Java.Util.ResourceBundle.GetBundle (baseName, targetLocale, loader, control)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("getBundle", "(Ljava/lang/String;Ljava/util/Locale;Ljava/lang/ClassLoader;Ljava/util/ResourceBundle$Control;)Ljava/util/ResourceBundle;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("getBundle", "(Ljava/lang/String;Ljava/util/Locale;Ljava/lang/ClassLoader;Ljava/util/ResourceBundle$Control;)Ljava/util/ResourceBundle;", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Util.ResourceBundle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseName" Type="System.String" />
<Parameter Name="targetLocale" Type="Java.Util.Locale" />
<Parameter Name="loader" Type="Java.Lang.ClassLoader" />
<Parameter Name="control" Type="Java.Util.ResourceBundle+Control" />
</Parameters>
<Docs>
<param name="baseName">the base name of the resource bundle, a fully qualified class name</param>
<param name="targetLocale">the target locale of the resource bundle</param>
<param name="loader">the class loader to load resource</param>
<param name="control">the control that control the access sequence</param>
<summary>Gets a resource bundle using the specified base name, the default locale,
and the caller's class loader.</summary>
<returns>a resource bundle for the given base name and the default locale</returns>
<remarks>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#getBundle(java.lang.String)" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.getBundle(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 9" />
</Docs>
</Member>
<Member MemberName="GetObject">
<MemberSignature Language="C#" Value="public Java.Lang.Object? GetObject (string? key);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Java.Lang.Object GetObject(string key) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.GetObject(System.String)" />
<MemberSignature Language="F#" Value="override this.GetObject : string -> Java.Lang.Object" Usage="resourceBundle.GetObject key" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("getObject", "(Ljava/lang/String;)Ljava/lang/Object;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("getObject", "(Ljava/lang/String;)Ljava/lang/Object;", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Lang.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
</Parameters>
<Docs>
<param name="key">the key for the desired object</param>
<summary>Gets an object for the given key from this resource bundle or one of its parents.</summary>
<returns>the object for the given key</returns>
<remarks>
<para>Gets an object for the given key from this resource bundle or one of its parents.
This method first tries to obtain the object from this resource bundle using
<c>#handleGetObject(java.lang.String) handleGetObject</c>.
If not successful, and the parent resource bundle is not null,
it calls the parent's <c>getObject</c> method.
If still not successful, it throws a MissingResourceException.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#getObject(java.lang.String)" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.getObject(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Util.MissingResourceException">if the resource is not found.
</exception>
</Docs>
</Member>
<Member MemberName="GetString">
<MemberSignature Language="C#" Value="public string? GetString (string? key);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetString(string key) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.GetString(System.String)" />
<MemberSignature Language="F#" Value="member this.GetString : string -> string" Usage="resourceBundle.GetString key" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("getString", "(Ljava/lang/String;)Ljava/lang/String;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("getString", "(Ljava/lang/String;)Ljava/lang/String;", "")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
</Parameters>
<Docs>
<param name="key">the key for the desired string</param>
<summary>Gets a string for the given key from this resource bundle or one of its parents.</summary>
<returns>the string for the given key</returns>
<remarks>
<para>Gets a string for the given key from this resource bundle or one of its parents.
Calling this method is equivalent to calling
<blockquote>
<c>(String) {@link #getObject(java.lang.String) getObject}(key)</c>.
</blockquote></para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/ResourceBundle#getString(java.lang.String)" title="Reference documentation">Java documentation for <code>java.util.ResourceBundle.getString(java.lang.String)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Util.MissingResourceException">if the resource is not found.</exception>
<exception cref="T:Java.Lang.ClassCastException">if the resource found is not a string.</exception>
<altmember cref="M:Java.Util.ResourceBundle.GetObject(System.String)" />
</Docs>
</Member>
<Member MemberName="GetStringArray">
<MemberSignature Language="C#" Value="public string[]? GetStringArray (string? key);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string[] GetStringArray(string key) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.ResourceBundle.GetStringArray(System.String)" />
<MemberSignature Language="F#" Value="member this.GetStringArray : string -> string[]" Usage="resourceBundle.GetStringArray key" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("getStringArray", "(Ljava/lang/String;)[Ljava/lang/String;", "")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("getStringArray", "(Ljava/lang/String;)[Ljava/lang/String;", "")>]</AttributeName>
</Attribute>
</Attributes>