samedi 14 novembre 2015

Call method.invoke(...) passing List> as argument

I'm trying to call this method by reflection, but I'm not succeeding.

Method method = App.class.getDeclaredMethod("imp" + tipTransa,
                        Connection.class,                       // connection
                        String.class,                           // token
                        String.class,                           // tipTransa
                        String.class,                           // tipOpe
                        String.class,                           // msgGuid
                        List<Map<String,Object>>.getClass());   // this is the problem
method.setAccessible(true);
method.invoke(null, conn, token, tipTransa, tipOpe, msgGuid, data);

How can I resolve the List<Map<String,Object>>.getClass() problem?





Aucun commentaire:

Enregistrer un commentaire