java.lang.Object
org.elasticsearch.entitlement.bridge.Util

public class Util extends Object
  • Field Details

    • NO_CLASS

      public static final Class<?> NO_CLASS
      A special value representing the case where a method has no caller. This can occur if it's called directly from the JVM.
      See Also:
  • Constructor Details

    • Util

      public Util()
  • Method Details

    • getCallerClass

      public static Class<?> getCallerClass()
      Why would we write this instead of using StackWalker.getCallerClass()? Because that method throws IllegalCallerException if called from the "outermost frame", which includes at least some cases of a method called from a native frame.
      Returns:
      the class that called the method which called this; or NO_CLASS from the outermost frame.