Megosztás a következőn keresztül:


Field Class

Definition

A Field provides information about, and dynamic access to, a single field of a class or an interface.

[Android.Runtime.Register("java/lang/reflect/Field", DoNotGenerateAcw=true)]
public sealed class Field : Java.Lang.Reflect.AccessibleObject, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.Reflect.IMember
[<Android.Runtime.Register("java/lang/reflect/Field", DoNotGenerateAcw=true)>]
type Field = class
    inherit AccessibleObject
    interface IMember
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
Attributes
Implements

Remarks

A Field provides information about, and dynamic access to, a single field of a class or an interface. The reflected field may be a class (static) field or an instance field.

A Field permits widening conversions to occur during a get or set access operation, but throws an IllegalArgumentException if a narrowing conversion would occur.

Java documentation for java.lang.reflect.Field.

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.

Properties

Accessible

Get the value of the accessible flag for this object. -or- Set the accessible flag for this object to the indicated boolean value.

(Inherited from AccessibleObject)
Class

Returns the runtime class of this Object.

(Inherited from Object)
DeclaringClass

Returns the Class object representing the class or interface that declares the field represented by this Field object.

GenericType

Returns a Type object that represents the declared type for the field represented by this Field object.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsEnumConstant

Returns true if this field represents an element of an enumerated type; returns false otherwise.

IsSynthetic

Returns true if this field is a synthetic field; returns false otherwise.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Modifiers

Returns the Java language modifiers for the field represented by this Field object, as an integer.

Name

Returns the name of the field represented by this Field object.

PeerReference (Inherited from Object)
ThresholdClass

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

(Inherited from AccessibleObject)
ThresholdType

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

(Inherited from AccessibleObject)
Type

Returns a Class object that identifies the declared type for the field represented by this Field object.

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

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

(Inherited from Object)
Get(Object)

Returns the value of the field represented by this Field, on the specified object.

GetAnnotation(Class)

Added in 1.

GetAnnotations()

Added in 1.

(Inherited from AccessibleObject)
GetAnnotationsByType(Class)

Added in 1.

(Inherited from AccessibleObject)
GetBoolean(Object)

Gets the value of a static or instance boolean field.

GetByte(Object)

Gets the value of a static or instance byte field.

GetChar(Object)

Gets the value of a static or instance field of type char or of another primitive type convertible to type char via a widening conversion.

GetDeclaredAnnotation(Class)

Added in 1.

(Inherited from AccessibleObject)
GetDeclaredAnnotations()

Added in 1.

(Inherited from AccessibleObject)
GetDeclaredAnnotationsByType(Class)

Added in 1.

(Inherited from AccessibleObject)
GetDouble(Object)

Gets the value of a static or instance field of type double or of another primitive type convertible to type double via a widening conversion.

GetFloat(Object)

Gets the value of a static or instance field of type float or of another primitive type convertible to type float via a widening conversion.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetInt(Object)

Gets the value of a static or instance field of type int or of another primitive type convertible to type int via a widening conversion.

GetLong(Object)

Gets the value of a static or instance field of type long or of another primitive type convertible to type long via a widening conversion.

GetShort(Object)

Gets the value of a static or instance field of type short or of another primitive type convertible to type short via a widening conversion.

IsAnnotationPresent(Class)
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)
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)
Set(Object, Object)

Sets the field represented by this Field object on the specified object argument to the specified new value.

SetBoolean(Object, Boolean)

Sets the value of a field as a boolean on the specified object.

SetByte(Object, SByte)

Sets the value of a field as a byte on the specified object.

SetChar(Object, Char)

Sets the value of a field as a char on the specified object.

SetDouble(Object, Double)

Sets the value of a field as a double on the specified object.

SetFloat(Object, Single)

Sets the value of a field as a float on the specified object.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetInt(Object, Int32)

Sets the value of a field as an int on the specified object.

SetLong(Object, Int64)

Sets the value of a field as a long on the specified object.

SetShort(Object, Int16)

Sets the value of a field as a short on the specified object.

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

Returns a string describing this Field, including its generic type.

ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
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)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to