From: cascade Date: Mon, 9 Feb 2004 11:22:16 +0000 (+0000) Subject: 5082,5083 Some corrections and improvements in WOK Java extractor.cdl,cxx,h,java... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=c867b31b5db33091d96182cffe923e7f14e3be7e;p=occt-wok.git 5082,5083 Some corrections and improvements in WOK Java extractor.cdl,cxx,h,java,edl need wok modification --- diff --git a/src/CPPJini/CPPJini_Template.edl b/src/CPPJini/CPPJini_Template.edl index bc975ab..053850a 100755 --- a/src/CPPJini/CPPJini_Template.edl +++ b/src/CPPJini/CPPJini_Template.edl @@ -23,9 +23,9 @@ $ $ $package %Interface; $ -$import jcas.Object; +$import jcas.Transient; $ -$public class Standard_Transient extends jcas.Object { +$public class Standard_Transient extends jcas.Transient { $ $ static { $ System.loadLibrary("%LibName"); @@ -363,8 +363,12 @@ $ $%ClassName* the_%ArgName = (%ClassName*) jcas_GetHandle(env,%ArgName); $if ( the_%ArgName == NULL ) { $ -$ the_%ArgName = new %ClassName (); -$ jcas_SetHandle ( env, %ArgName, the_%ArgName ); +$ // The following assumes availability of the default constructor (what may not +$ // always be the case). Therefore explicit exception is thrown if the null +$ // object has been passed. +$ // the_%ArgName = new %ClassName (); +$ // jcas_SetHandle ( env, %ArgName, the_%ArgName ); +$ jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value"); $ $} // end if @end;