kohiro / gwt-ent

Automatically exported from code.google.com/p/gwt-ent
0 stars 0 forks source link

Can not invoke static methods via GwtEnt reflection #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
ClassType ct = TypeOracle.Instance.getClassType(UnvanDto.class);
ct.invoke(UnvanDto.class, "getInstance", null);

getInstance is a static method. UnvanDto implements Reflection interface.

What is the expected output? What do you see instead?
java.lang.ClassCastException:
java.lang.Class cannot be cast to 
tr.com.yuvamgroup.common.gwtshared.UnvanDto
    at 
com.gwtent.client.reflection.TypeOracle_Visitor$tr_com_yuvamgroup_common_gw
tshared_UnvanDto.invoke(transient source for 
com.gwtent.client.reflection.TypeOracle_Visitor:2341)
    at 
tr.com.yuvamgroup.ebelediye.gwtclient.unvan.UnvanEditController.doSave
(UnvanEditController.java:88)

What version of the product are you using? On what operating system?
gwtent 0.6

Please provide any additional information below.

Original issue reported on code.google.com by gurselk...@gmail.com on 11 Jun 2009 at 1:39

GoogleCodeExporter commented 9 years ago
here is the answer... 
ClassType ct = TypeOracle.Instance.getClassType(UnvanDto.class);
ct.invoke(null, "getInstance", null);

Original comment by gurselk...@gmail.com on 22 Jun 2009 at 10:21

GoogleCodeExporter commented 9 years ago
Thanks gurselkoca, I will make a change as well.

Original comment by JamesLuo...@gmail.com on 20 Aug 2009 at 11:45

GoogleCodeExporter commented 9 years ago

Original comment by JamesLuo...@gmail.com on 20 Aug 2009 at 11:46