lundi 28 mai 2018

what will be syntax of getMethod() in Java reflection if parameter of method is of Generic type? [duplicate]

This question already has an answer here:

General syntax for getMethod() is getMethod("method_name",Parameter_types)...what happens if method has generic type as parameter.

Class Example
   {
     void display(T t)
    {     }
    pvsm(String []ar)
    { 
    Class<Example> obj=Example.class;
    Method mth=obj.getMethod("display",?); //what will be in place of ??

    }
   }





Aucun commentaire:

Enregistrer un commentaire