OSDN Git Service

2001-11-02 Hans Boehm <Hans_Boehm@hp.com>
[pf3gnuchains/gcc-fork.git] / libjava / java / util / natResourceBundle.cc
1 // natResourceBundle.cc - Native code for ResourceBundle class.
2
3 /* Copyright (C) 2001  Free Software Foundation
4
5    This file is part of libgcj.
6
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
9 details.  */
10
11 #include <config.h>
12
13 #include <gcj/cni.h>
14 #include <jvm.h>
15 #include <java/util/ResourceBundle.h>
16 #include <java/lang/Class.h>
17 #include <java/lang/ClassLoader.h>
18
19 JArray<jclass> *
20 java::util::ResourceBundle::getClassContext ()
21 {
22   // FIXME: we currently lack the capability to correctly implement
23   // this method.  So we fake it by telling ResourceBundle that we
24   // only have the system class loader.
25   jobjectArray a = JvNewObjectArray (2, &java::lang::Class::class$, NULL);
26   jobject *elts = elements (a);
27   elts[0] = &class$;
28   elts[1] = elts[0];
29
30   return reinterpret_cast< JArray<jclass> *> (a);
31 }