Method.GetGenericParameterTypes Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an array of Type objects that represent the formal parameter types, in declaration order, of the executable represented by this object.
[Android.Runtime.Register("getGenericParameterTypes", "()[Ljava/lang/reflect/Type;", "")]
public override Java.Lang.Reflect.IType[]? GetGenericParameterTypes();
[<Android.Runtime.Register("getGenericParameterTypes", "()[Ljava/lang/reflect/Type;", "")>]
override this.GetGenericParameterTypes : unit -> Java.Lang.Reflect.IType[]
Returns
an array of Types that represent the formal parameter types of the underlying executable, in declaration order
- Attributes
Exceptions
if the generic method signature is invalid
if any parameter type points to a missing type
if any parameter type points to a type that cannot be instantiated for some reason
Remarks
Returns an array of Type objects that represent the formal parameter types, in declaration order, of the executable represented by this object. An array of length 0 is returned if the underlying executable takes no parameters. Note that the constructors of some inner classes may have an implicitly declared parameter in addition to explicitly declared ones. Compact constructors of a record class may also have implicitly declared parameters, but they are a special case and thus considered as if they had been explicitly declared in the source. Finally note that as a modeling artifact, the number of returned parameters can differ depending on whether or not generic information is present. If generic information is present, parameters explicitly present in the source or parameters of compact constructors of a record class will be returned. Note that parameters of compact constructors of a record class are a special case, as they are not explicitly present in the source, and its type will be returned regardless of the parameters being implicitly declared or not. If generic information is not present, implicit and synthetic parameters may be returned as well. If a formal parameter type is a parameterized type, the Type object returned for it must accurately reflect the actual type arguments used in the source code. This assertion also applies to the parameters of compact constructors of a record class, independently of them being implicitly declared or not. If a formal parameter type is a type variable or a parameterized type, it is created. Otherwise, it is resolved.
Added in 1.5.
Java documentation for java.lang.reflect.Method.getGenericParameterTypes().
Java reference for java.lang.reflect.Method.getGenericParameterTypes.
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.