java - How to get Class Object of an ArrayList type? -


this question has answer here:

i trying access method through reflection, , getmethod() function requires class parameter type. parameter class object, , i'm not sure how arraylist<string> type. here current code, want change string.class:

method m = o.getclass().getmethod(method, string.class); 

for method signature

public static void method(arraylist<string> options); 

you can method using

method m = o.getclass().getmethod(method, arraylist.class); 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -