1
2
3
4 package joeq.ClassLib.Common.java.util;
5
6 import joeq.Class.jq_CompiledCode;
7 import joeq.Memory.StackAddress;
8 import joeq.Runtime.Reflection;
9 import joeq.Runtime.StackCodeWalker;
10 import jwutil.util.Assert;
11
12 /***
13 * ResourceBundle
14 *
15 * @author John Whaley <jwhaley@alum.mit.edu>
16 * @version $Id: ResourceBundle.java 1941 2004-09-30 03:37:06Z joewhaley $
17 */
18 abstract class ResourceBundle {
19
20 private static Class[] getClassContext() {
21 StackCodeWalker sw = new StackCodeWalker(null, StackAddress.getBasePointer());
22 sw.gotoNext();
23 int i;
24 for (i=0; sw.hasNext(); ++i, sw.gotoNext()) ;
25 Class[] classes = new Class[i];
26 sw = new StackCodeWalker(null, StackAddress.getBasePointer());
27 sw.gotoNext();
28 for (i=0; sw.hasNext(); ++i, sw.gotoNext()) {
29 jq_CompiledCode cc = sw.getCode();
30 if (cc == null) classes[i] = null;
31 else classes[i] = Reflection.getJDKType(cc.getMethod().getDeclaringClass());
32 }
33 Assert._assert(i == classes.length);
34 return classes;
35 }
36
37 }