Udostępnij za pośrednictwem


ResourceBundle.Control.GetFormats(String) Method

Definition

Returns a List of Strings containing formats to be used to load resource bundles for the given baseName.

[Android.Runtime.Register("getFormats", "(Ljava/lang/String;)Ljava/util/List;", "GetGetFormats_Ljava_lang_String_Handler")]
public virtual System.Collections.Generic.IList<string>? GetFormats (string baseName);
[<Android.Runtime.Register("getFormats", "(Ljava/lang/String;)Ljava/util/List;", "GetGetFormats_Ljava_lang_String_Handler")>]
abstract member GetFormats : string -> System.Collections.Generic.IList<string>
override this.GetFormats : string -> System.Collections.Generic.IList<string>

Parameters

baseName
String

the base name of the resource bundle, a fully qualified class name

Returns

a List of Strings containing formats for loading resource bundles.

Attributes

Remarks

Returns a List of Strings containing formats to be used to load resource bundles for the given baseName. The ResourceBundle.getBundle factory method tries to load resource bundles with formats in the order specified by the list. The list returned by this method must have at least one String. The predefined formats are "java.class" for class-based resource bundles and "java.properties" for PropertyResourceBundle properties-based ones. Strings starting with "java." are reserved for future extensions and must not be used by application-defined formats.

It is not a requirement to return an immutable (unmodifiable) List. However, the returned List must not be mutated after it has been returned by getFormats.

The default implementation returns #FORMAT_DEFAULT so that the ResourceBundle.getBundle factory method looks up first class-based resource bundles, then properties-based ones.

Java documentation for java.util.ResourceBundle.Control.getFormats(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to