共用方式為


Attributes Class

Definition

The Attributes class maps Manifest attribute names to associated string values.

[Android.Runtime.Register("java/util/jar/Attributes", DoNotGenerateAcw=true)]
public class Attributes : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.ICloneable, Java.Util.IMap
[<Android.Runtime.Register("java/util/jar/Attributes", DoNotGenerateAcw=true)>]
type Attributes = class
    inherit Object
    interface ICloneable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface IMap
Inheritance
Attributes
Attributes
Implements

Remarks

The Attributes class maps Manifest attribute names to associated string values. Valid attribute names are case-insensitive, are restricted to the ASCII characters in the set [0-9a-zA-Z_-], and cannot exceed 70 characters in length. There must be a colon and a SPACE after the name; the combined length will not exceed 72 characters. Attribute values can contain any characters and will be UTF8-encoded when written to the output stream. See the JAR File Specification for more information about valid attribute names and values.

This map and its views have a predictable iteration order, namely the order that keys were inserted into the map, as with LinkedHashMap.

Added in 1.2.

Java documentation for java.util.jar.Attributes.

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.

Constructors

Attributes()

Constructs a new, empty Attributes object with default size.

Attributes(Attributes)

Constructs a new Attributes object with the same attribute name-value mappings as in the specified Attributes.

Attributes(Int32)

Constructs a new, empty Attributes object with the specified initial size.

Attributes(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsEmpty

Returns true if this Map contains no attributes.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Map

The attribute name-value mappings.

PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

Clear()

Removes all attributes from this Map.

Clone()

Returns a copy of the Attributes, implemented as follows:

ContainsKey(Object)

Returns true if this Map contains the specified attribute name (key).

ContainsValue(Object)

Returns true if this Map maps one or more attribute names (keys) to the specified value.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
EntrySet()

Returns a Collection view of the attribute name-value mappings contained in this Map.

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
Get(Object)

Returns the value of the specified attribute name, or null if the attribute name was not found.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetValue(Attributes+Name)

Returns the value of the specified attribute name, specified as a string, or null if the attribute was not found.

GetValue(String)

Returns the value of the specified attribute name, specified as a string, or null if the attribute was not found.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
KeySet()

Returns a Set view of the attribute names (keys) contained in this Map.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
Put(Object, Object)

Associates the specified value with the specified attribute name (key) in this Map.

PutAll(IDictionary)

Copies all of the attribute name-value mappings from the specified Attributes to this Map.

PutValue(String, String)

Associates the specified value with the specified attribute name, specified as a String.

Remove(Object)

Removes the attribute with the specified name (key) from this Map.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
Size()

Returns the number of attributes in this Map.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Values()

Returns a Collection view of the attribute values contained in this Map.

Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)
IMap.ContainsKey(Object)
IMap.ContainsValue(Object)
IMap.Get(Object)
IMap.Put(Object, Object)
IMap.Remove(Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to