[Jpeergen-cvs] dev/src/java/org/progeeks/jni PeerDoclet.java,1.1,1.2
Status: Beta
Brought to you by:
pspeed
|
From: <ps...@us...> - 2004-08-15 05:55:41
|
Update of /cvsroot/jpeergen/dev/src/java/org/progeeks/jni In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21469/src/java/org/progeeks/jni Modified Files: PeerDoclet.java Log Message: Added an additional javadoc tag type to specify that a return value should not be converted even if it looks like it could be. This is useful in several cases, not the least of which that classes with native peered static methods that don't otherwise create peers will have problems otherwise. Also, if the C++ code is already JNI-aware and knows how to deal with the jobjects directly (ie: when building lists, etc..) then this is more useful. Also made the exception handling a little more robust. Index: PeerDoclet.java =================================================================== RCS file: /cvsroot/jpeergen/dev/src/java/org/progeeks/jni/PeerDoclet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PeerDoclet.java 12 Aug 2004 21:11:03 -0000 1.1 --- PeerDoclet.java 15 Aug 2004 05:55:18 -0000 1.2 *************** *** 86,89 **** --- 86,95 ---- public static final String TAG_PEERED = "@peered"; + /** + * Custom tag for specifying a reverse peered method whose return + * value is left uncast even if it could otherwise be converted. + */ + public static final String TAG_PEERED_RAW = "@peered.return.jni"; + private static ClassDoc classDoc; private static ClassDoc throwableDoc; *************** *** 276,280 **** for( int j = 0; j < fields.length; j++ ) { ! codelets[i].writeField( fields[j] ); } --- 282,293 ---- for( int j = 0; j < fields.length; j++ ) { ! try ! { ! codelets[i].writeField( fields[j] ); ! } ! catch( Exception e ) ! { ! throw new RuntimeException( "Error generating code for field:" + fields[j], e ); ! } } *************** *** 282,286 **** for( int j = 0; j < methods.length; j++ ) { ! codelets[i].writeMethod( methods[j] ); } } --- 295,306 ---- for( int j = 0; j < methods.length; j++ ) { ! try ! { ! codelets[i].writeMethod( methods[j] ); ! } ! catch( Exception e ) ! { ! throw new RuntimeException( "Error generating code for method:" + methods[j], e ); ! } } } |