java - Instantiate parameterized type using Class.forName -


i have following classes:

public class b { }  public class a<b> { } 

how instantiate class a using class.forname, given have 2 string variables:

string classnamea = "a"; string classnameb = "b"; 

due type erasure, there won't generic classes @ run time.

for instance, following piece of code output class java.util.arraylist without generics:

list<string> list = new arraylist<string>(); system.out.println(list.getclass()); 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -