Index: include/Makefile.am =================================================================== RCS file: /cvsroot/classpath/classpath/include/Makefile.am,v retrieving revision 1.10 diff -u -r1.10 Makefile.am --- include/Makefile.am 12 Feb 2004 16:53:09 -0000 1.10 +++ include/Makefile.am 15 Mar 2004 23:04:48 -0000 @@ -42,6 +42,7 @@ $(top_srcdir)/include/java_io_FileDescriptor.h \ $(top_srcdir)/include/java_io_File.h \ $(top_srcdir)/include/java_io_ObjectInputStream.h \ +$(top_srcdir)/include/java_io_VMObjectStreamClass.h \ $(top_srcdir)/include/java_lang_Double.h \ $(top_srcdir)/include/java_lang_Math.h \ $(top_srcdir)/include/java_lang_Object.h \ @@ -138,6 +139,8 @@ $(JAVAH) -o $@ java.io.File $(top_srcdir)/include/java_io_ObjectInputStream.h: $(top_srcdir)/java/io/ObjectInputStream.java $(JAVAH) -o $@ java.io.ObjectInputStream +$(top_srcdir)/include/java_io_VMObjectStreamClass.h: ../vm/current/java/io/VMObjectStreamClass.java + $(JAVAH) -o $@ java.io.VMObjectStreamClass $(top_srcdir)/include/java_lang_Double.h: $(top_srcdir)/java/lang/Double.java $(JAVAH) -o $@ java.lang.Double $(top_srcdir)/include/java_lang_Math.h: $(top_srcdir)/java/lang/Math.java Index: include/java_io_VMObjectStreamClass.h =================================================================== RCS file: include/java_io_VMObjectStreamClass.h diff -N include/java_io_VMObjectStreamClass.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ include/java_io_VMObjectStreamClass.h 15 Mar 2004 23:04:48 -0000 @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#ifndef __java_io_VMObjectStreamClass__ +#define __java_io_VMObjectStreamClass__ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +extern JNIEXPORT jboolean JNICALL Java_java_io_VMObjectStreamClass_hasClassInitializer (JNIEnv *env, jclass, jclass); + +#ifdef __cplusplus +} +#endif + +#endif /* __java_io_VMObjectStreamClass__ */ Index: native/jni/java-io/Makefile.am =================================================================== RCS file: /cvsroot/classpath/classpath/native/jni/java-io/Makefile.am,v retrieving revision 1.12 diff -u -r1.12 Makefile.am --- native/jni/java-io/Makefile.am 2 Jul 2003 09:16:52 -0000 1.12 +++ native/jni/java-io/Makefile.am 15 Mar 2004 23:04:48 -0000 @@ -4,7 +4,8 @@ javaio.c \ java_io_File.c \ FileDescriptor.c \ - java_io_ObjectInputStream.c + java_io_ObjectInputStream.c \ + java_io_VMObjectStreamClass.c libjavaio_la_LDFLAGS = -module -version-info @LIBVERSION@ Index: native/jni/java-io/java_io_VMObjectStreamClass.c =================================================================== RCS file: native/jni/java-io/java_io_VMObjectStreamClass.c diff -N native/jni/java-io/java_io_VMObjectStreamClass.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ native/jni/java-io/java_io_VMObjectStreamClass.c 15 Mar 2004 23:04:48 -0000 @@ -0,0 +1,61 @@ +/* java_io_VMObjectStreamClass.c -- Native methods for VMObjectStreamClass.java + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +#include +#include + +#include "java_io_VMObjectStreamClass.h" + +/* + * Class: java_io_VMObjectOutputStream + * Method: hasClassInitializer + * Signature: (Ljava/lang/Class;)Z + */ +JNIEXPORT jboolean JNICALL +Java_java_io_VMObjectStreamClass_hasClassInitializer( JNIEnv * env, + jclass vmosklass, + jclass klass ) +{ + jmethodID mid = (*env)->GetStaticMethodID(env, klass, "", "()V"); + if (mid == NULL) + { + (*env)->ExceptionClear(env); + return JNI_FALSE; + } + return JNI_TRUE; +}