From: pmarguerite Date: Mon, 20 Mar 2006 13:51:27 +0000 (+0000) Subject: Add object casting for instrospection methods X-Git-Tag: Release_0.2~330 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=916aba7790b0a8bf8bc10308ca366198ed44b34e;p=vamsas.git Add object casting for instrospection methods git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@190 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/org/vamsas/client/Vobject.java b/src/org/vamsas/client/Vobject.java index cb2738f..a393b9e 100644 --- a/src/org/vamsas/client/Vobject.java +++ b/src/org/vamsas/client/Vobject.java @@ -251,7 +251,7 @@ public abstract class Vobject { try { // castor descriptor resolver magic descriptor = this.getClass().getClassLoader().loadClass(this.getClass().getName()+"Descriptor"); - descimpl = (XMLClassDescriptorImpl) descriptor.getConstructor(null).newInstance(null); + descimpl = (XMLClassDescriptorImpl) descriptor.getConstructor((Class[])null).newInstance((Object[])null); } catch (Exception e) { log.fatal("Source Generation Error!: Couldn't resolve descriptor for " +this.getClass().getName() @@ -311,9 +311,9 @@ public abstract class Vobject { if (o!=null) { // XMLClassDescriptorImpl fclasdes = (XMLClassDescriptorImpl) o; String methname = "get"+fields[i].getFieldName(); - Method fgetmeth = this.getClass().getMethod(methname,null); + Method fgetmeth = this.getClass().getMethod(methname,(Class[])null); if (fgetmeth!=null) { - Object fval = fgetmeth.invoke(this,null); + Object fval = fgetmeth.invoke(this,(Object[])null); if (fval!=null) rf = (Vobject) fval; } else {