Android Guides | Samples

Java.Lang.Reflect.Field Class

This class represents a field.

See Also: Field

Syntax

[Android.Runtime.Register("java/lang/reflect/Field", DoNotGenerateAcw=true)]
public sealed class Field : AccessibleObject, IMember, IDisposable

Remarks

This class represents a field. Information about the field can be accessed, and the field's value can be accessed dynamically.

[Android Documentation]

Requirements

Namespace: Java.Lang.Reflect
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Java.Lang.Reflect.Field are listed below.

See Also: AccessibleObject

Public Properties

[read-only]
DeclaringClassClass. Returns the class that declares this member.
[read-only]
GenericTypeIType. Returns the generic type of this field.
[read-only]
IsEnumConstantBoolean. Indicates whether or not this field is an enumeration constant.
[read-only]
IsSyntheticBoolean. Indicates whether or not this field is synthetic.
[read-only]
ModifiersInt32. Returns the modifiers for this field.
[read-only]
NameString. Returns the name of this field.
[read-only]
TypeClass. Return the Class associated with the type of this field.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Get(Object) : Object
Returns the value of the field in the specified object.
GetBoolean(Object) : Boolean
Returns the value of the field in the specified object as a boolean.
GetByte(Object) : SByte
Returns the value of the field in the specified object as a byte.
GetChar(Object) : Char
Returns the value of the field in the specified object as a char.
GetDouble(Object) : Double
Returns the value of the field in the specified object as a double.
GetFloat(Object) : Single
Returns the value of the field in the specified object as a float .
GetInt(Object) : Int32
Returns the value of the field in the specified object as an int.
GetLong(Object) : Int64
Returns the value of the field in the specified object as a long.
GetShort(Object) : Int16
Returns the value of the field in the specified object as a short .
Set(Object, Object)
Sets the value of the field in the specified object to the value.
SetBoolean(Object, Boolean)
Sets the value of the field in the specified object to the boolean value.
SetByte(Object, SByte)
Sets the value of the field in the specified object to the byte value.
SetChar(Object, Char)
Sets the value of the field in the specified object to the char value.
SetDouble(Object, Double)
Sets the value of the field in the specified object to the double value.
SetFloat(Object, Single)
Sets the value of the field in the specified object to the float value.
SetInt(Object, Int32)
Set the value of the field in the specified object to the int value.
SetLong(Object, Int64)
Sets the value of the field in the specified object to the long value.
SetShort(Object, Int16)
Sets the value of the field in the specified object to the short value.
ToGenericString() : String
Returns the string representation of this field, including the field's generic type.