Compartilhar via


Manifest.GetAttributes(String) Method

Definition

Returns the Attributes for the specified entry name.

[Android.Runtime.Register("getAttributes", "(Ljava/lang/String;)Ljava/util/jar/Attributes;", "GetGetAttributes_Ljava_lang_String_Handler")]
public virtual Java.Util.Jar.Attributes? GetAttributes (string? name);
[<Android.Runtime.Register("getAttributes", "(Ljava/lang/String;)Ljava/util/jar/Attributes;", "GetGetAttributes_Ljava_lang_String_Handler")>]
abstract member GetAttributes : string -> Java.Util.Jar.Attributes
override this.GetAttributes : string -> Java.Util.Jar.Attributes

Parameters

name
String

entry name

Returns

the Attributes for the specified entry name

Attributes

Remarks

Returns the Attributes for the specified entry name. This method is defined as:

return (Attributes)getEntries().get(name)

Though null is a valid name, when getAttributes(null) is invoked on a Manifest obtained from a jar file, null will be returned. While jar files themselves do not allow null-named attributes, it is possible to invoke #getEntries on a Manifest, and on that result, invoke put with a null key and an arbitrary value. Subsequent invocations of getAttributes(null) will return the just-put value.

Note that this method does not return the manifest's main attributes; see #getMainAttributes.

Java documentation for java.util.jar.Manifest.getAttributes(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