title: sun.reflect.Reflection.getCallerClass alternative
body: <p>From <a href="https://stackoverflow.com/questions/421280/how-do-i-find-the-caller-of-a-method-using-stacktrace-or-reflection">How do I find the caller of a method using stacktrace or reflection?</a>  ( as I didn't have enough reputation to comment there itself )</p>
  
  <p>Since sun.reflect.Reflection.getCallerClass has been removed in jdk8,
  What could be an alternative ?</p>
  
  <p>How about using 
  sun.misc.SharedSecrets </p>
  
  <pre><code>    JavaLangAccess access = SharedSecrets.getJavaLangAccess();
      Throwable throwable = new Throwable();
      int depth = access.getStackTraceDepth(throwable);
      StackTraceElement frame = access.getStackTraceElement(throwable, depth);
  </code></pre>