public static ClassLoader callerClassLoader(){
  if (org.jikesrvm.VM.runningVM) {
    ClassLoader ans=RVMClass.getClassLoaderFromStackFrame(2);
    if (ans == BootstrapClassLoader.getBootstrapClassLoader()) {
      return null;
    }
 else {
      return ans;
    }
  }
 else {
    return null;
  }
}

public static ClassLoader callerClassLoader ( ) { if ( org . jikesrvm . VM . runningVM ) { ClassLoader ans = RVMClass . getClassLoaderFromStackFrame ( 2 ) ; if ( ans == BootstrapClassLoader . getBootstrapClassLoader ( ) ) { return null ; } else { return ans ; } } else { return null ; } }
this method must be included , as it is used by resourcebundle . getbundle ( ) , and other places as well . the reference implementation of this method uses the getstackclassloader ( ) method . returns the classloader of the method that called the caller . i . e . a . x ( ) calls b . y ( ) calls callerclassloader ( ) , a ' s classloader will be returned . returns null for the bootstrap classloader .
