38 |
|
|
39 |
package java.lang; |
package java.lang; |
40 |
|
|
41 |
|
import gnu.classpath.VMStackWalker; |
42 |
|
|
43 |
import java.awt.AWTPermission; |
import java.awt.AWTPermission; |
44 |
import java.io.File; |
import java.io.File; |
45 |
import java.io.FileDescriptor; |
import java.io.FileDescriptor; |
181 |
*/ |
*/ |
182 |
protected Class[] getClassContext() |
protected Class[] getClassContext() |
183 |
{ |
{ |
184 |
return VMSecurityManager.getClassContext(); |
Class[] stack1 = VMStackWalker.getClassContext(); |
185 |
|
Class[] stack2 = new Class[stack1.length - 1]; |
186 |
|
System.arraycopy(stack1, 1, stack2, 0, stack1.length - 1); |
187 |
|
return stack2; |
188 |
} |
} |
189 |
|
|
190 |
/** |
/** |
206 |
*/ |
*/ |
207 |
protected ClassLoader currentClassLoader() |
protected ClassLoader currentClassLoader() |
208 |
{ |
{ |
209 |
return VMSecurityManager.currentClassLoader(); |
Class cl = currentLoadedClass(); |
210 |
|
return cl != null ? cl.getClassLoader() : null; |
211 |
} |
} |
212 |
|
|
213 |
/** |
/** |