summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2005-11-27 21:00:34 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2005-11-27 21:00:34 +0000
commit15ee25b923180850794e71cc44c9859e65eea8a2 (patch)
tree5115c5c9f0dacfbeb537decc2bcb25ef362e039f /vm
parent6f383d9c78e81a535c35c5e69df90cd5a4d1dbfa (diff)
downloadclasspath-15ee25b923180850794e71cc44c9859e65eea8a2.tar.gz
2005-11-27 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of HEAD --> generics from the release of Classpath 0.19 to 2005/11/27.
Diffstat (limited to 'vm')
-rw-r--r--vm/reference/gnu/classpath/VMStackWalker.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/vm/reference/gnu/classpath/VMStackWalker.java b/vm/reference/gnu/classpath/VMStackWalker.java
index 28e4ce364..e995c4634 100644
--- a/vm/reference/gnu/classpath/VMStackWalker.java
+++ b/vm/reference/gnu/classpath/VMStackWalker.java
@@ -88,9 +88,9 @@ public final class VMStackWalker
/**
* Get the class loader associated with the Class returned by
- * <code>getCallingClass()</code>, or <code>null</code> if no
- * such class exists or it is the boot loader. This method is an optimization
- * for the expression <code>getClassContext()[1].getClassLoader()</code>
+ * <code>getCallingClass()</code>, or <code>null</code> if no such class
+ * exists or it is the boot loader. This method is an optimization for the
+ * expression <code>VMStackWalker.getClassLoader(getClassContext()[1])</code>
* and should return the same result.
*
* <p>
@@ -102,7 +102,15 @@ public final class VMStackWalker
Class[] ctx = getClassContext();
if (ctx.length < 3)
return null;
- return ctx[2].getClassLoader();
+ return getClassLoader(ctx[2]);
}
+
+ /**
+ * Retrieve the class's ClassLoader, or <code>null</code> if loaded
+ * by the bootstrap loader. I.e., this should return the same thing
+ * as {@link java.lang.VMClass#getClassLoader}. This duplicate version
+ * is here to work around access permissions.
+ */
+ public static native ClassLoader getClassLoader(Class cl);
}