Android Guides | Samples

Java.Lang.Reflect.Method Class

This class represents a method.

See Also: Method

Syntax

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

Remarks

This class represents a method. Information about the method can be accessed, and the method can be invoked 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.Method are listed below.

See Also: AccessibleObject

Public Properties

[read-only]
DeclaringClassClass. Returns the class that declares this method.
[read-only]
DefaultValueObject. Returns the default value for the annotation member represented by this method.
[read-only]
GenericReturnTypeIType. Returns the return type of this method as a Type instance.
[read-only]
IsBridgeBoolean. Indicates whether or not this method is a bridge.
[read-only]
IsSyntheticBoolean. Indicates whether or not this method is synthetic.
[read-only]
IsVarArgsBoolean. Indicates whether or not this method takes a variable number argument.
[read-only]
ModifiersInt32. Returns the modifiers for this method.
[read-only]
NameString. Returns the name of the method represented by this Method instance.
[read-only]
ReturnTypeClass. Returns the Class associated with the return type of this method.

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

GetExceptionTypes() : Class[]
Returns the exception types as an array of Class instances.
GetGenericExceptionTypes() : IType[]
Returns the exception types as an array of Type instances.
GetGenericParameterTypes() : IType[]
Returns the parameter types as an array of Type instances, in declaration order.
GetParameterAnnotations() : IAnnotation[][]
Returns an array of arrays that represent the annotations of the formal parameters of this method.
GetParameterTypes() : Class[]
Returns an array of Class objects associated with the parameter types of this method.
GetTypeParameters() : ITypeVariable[]
Returns the declared type parameters in declaration order.
Invoke(Object, params Object[]) : Object
ToGenericString() : String
Returns the string representation of the method's declaration, including the type parameters.