Java Method getTypeParameters() MethodThe getTypeParameters () method of Method class returns an array of type TypeVariable objects that represent the type of variables declared by the generic declaration represented by this Generic Declaration object, in the same order in which declared. If underlying generic declares no type variable, then an array of length 0 is returned. SyntaxParameterNo parameter is passed. Returnsthe array of TypeVariable objects representing the type variables declared by this generic declaration ThrowGenericSignatureFormatError Example 1Test it NowOutput: [Ljava.lang.reflect.TypeVariable;@7852e922 Example 2Test it NowOutput: Type variable for Method Name getMethodX is N
Next TopicJava Method Class
|