I have a case, generate an instance dynamically ie, i have map like
Map<String,Class> classMap=new HashMap<String,Class>();
classMap.put("key1",Panel.Class);
classMap.put("key2",Panel1.Class);
classMap.put("key3",Panel2.Class);
Class clazz=map.get("key");
GWT.create(clazz);
when i compile using GWT Compile
i got the exception
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[ERROR] Errors in 'com/asklepian/web/Sample/sample.java'
[ERROR] Line 19: Only class literals may be used as arguments to GWT.create()
is there is any better way to achieve the same.Thanks in advance