2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / gcj / method.h
blobd4246e41ef822bb463c3c433d1a58e085d707fcd
1 // method.h - Header file for methodID instances. -*- c++ -*-
3 /* Copyright (C) 1999, 2000 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
11 #ifndef __GCJ_METHOD_H__
12 #define __GCJ_METHOD_H__
14 #include <java/lang/Class.h>
16 extern inline jmethodID
17 _Jv_FromReflectedMethod (java::lang::reflect::Method *method)
19 return (jmethodID)
20 ((char *) method->declaringClass->methods + method->offset);
23 extern inline jmethodID
24 _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *constructor)
26 return (jmethodID)
27 ((char *) constructor->declaringClass->methods + constructor->offset);
30 extern inline jint
31 JvNumMethods (jclass klass)
33 return klass->method_count;
36 extern inline jmethodID
37 JvGetFirstMethod (jclass klass)
39 return &klass->methods[0];
42 #endif /* __GCJ_METHOD_H__ */