mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-21 08:03:41 +08:00
355dff4cef
* gcj/method.h (JvNumMethods): Moved from Class.h. (JvGetFirstMethod): Likewise. * java/lang/Class.h (Object): Updated decl of _Jv_JNI_ToReflectedField. (Object): Added _Jv_JNI_ToReflectedMethod as a friend. * Makefile.in: Rebuilt. * Makefile.am (java/lang/reflect/Field.h): Added `jboolean' argument of _Jv_JNI_ToReflectedField. (java/lang/reflect/Constructor.h): Added _Jv_JNI_ToReflectedMethod as a friend. (java/lang/reflect/Method.h): Likewise. * include/jni.h (class _Jv_JNIEnv): Added `klass' member. Use __GCJ_JNI_IMPL__. (jweak): New typedef. (struct JNINativeInterface): Correctly declare remaining entries. * jni.cc: Include Class.h, ClassLoader.h. (_Jv_JNI_FindClass): New function. (_Jv_JNI_DefineClass): New function. (_Jv_JNI_conversion_call): New function. (_Jv_JNI_FindClass): Use current class loader to find class. (_Jv_JNI_ExceptionCheck): New function. (_Jv_JNI_FromReflectedField): Now static. (MethodClass): New define. (_Jv_JNI_FromReflectedMethod): New function. (_Jv_JNI_ToReflectedMethod): Likewise. Include Method.h. (_Jv_JNI_IsAssignableFrom): Renamed. (_Jv_JNI_GetStringRegion): New function. Include StringIndexOutOfBoundsException.h. (_Jv_JNI_GetStringUTFRegion): New function. (_Jv_JNIFunctions): Updated for new functions. (_Jv_JNI_GetPrimitiveArrayCritical): New function (_Jv_JNI_ReleasePrimitiveArrayCritical): Likewise. (_Jv_JNI_GetStringCritical): New function. (_Jv_JNI_ReleaseStringCritical): Likewise. (get_throwable): Removed. (GCJ_JV_JNIENV_FRIEND): Removed. (__GCJ_JNI_IMPL__): Define. Include method.h. From-SVN: r31638
43 lines
945 B
C++
43 lines
945 B
C++
// method.h - Header file for methodID instances. -*- c++ -*-
|
|
|
|
/* Copyright (C) 1999, 2000 Red Hat, Inc.
|
|
|
|
This file is part of libgcj.
|
|
|
|
This software is copyrighted work licensed under the terms of the
|
|
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|
details. */
|
|
|
|
#ifndef __GCJ_METHOD_H__
|
|
#define __GCJ_METHOD_H__
|
|
|
|
#include <java/lang/Class.h>
|
|
|
|
extern inline jmethodID
|
|
_Jv_FromReflectedMethod (java::lang::reflect::Method *method)
|
|
{
|
|
return (jmethodID)
|
|
((char *) method->declaringClass->methods + method->offset);
|
|
}
|
|
|
|
extern inline jmethodID
|
|
_Jv_FromReflectedConstructor (java::lang::reflect::Constructor *constructor)
|
|
{
|
|
return (jmethodID)
|
|
((char *) constructor->declaringClass->methods + constructor->offset);
|
|
}
|
|
|
|
extern inline jint
|
|
JvNumMethods (jclass klass)
|
|
{
|
|
return klass->method_count;
|
|
}
|
|
|
|
extern inline jmethodID
|
|
JvGetFirstMethod (jclass klass)
|
|
{
|
|
return &klass->methods[0];
|
|
}
|
|
|
|
#endif /* __GCJ_METHOD_H__ */
|