Package akka.util

Class Reflect


  • public class Reflect
    extends java.lang.Object
    Collection of internal reflection utilities which may or may not be available (most services specific to HotSpot, but fails gracefully).

    INTERNAL API

    • Constructor Summary

      Constructors 
      Constructor Description
      Reflect()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.reflect.Type findMarker​(java.lang.Class<?> root, java.lang.Class<?> marker)  
      static scala.Option<scala.Function1<java.lang.Object,​java.lang.Class<?>>> getCallerClass()
      This optionally holds a function which looks N levels above itself on the call stack and returns the Class[_] object for the code executing in that stack frame.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Reflect

        public Reflect()
    • Method Detail

      • getCallerClass

        public static scala.Option<scala.Function1<java.lang.Object,​java.lang.Class<?>>> getCallerClass()
        This optionally holds a function which looks N levels above itself on the call stack and returns the Class[_] object for the code executing in that stack frame. Implemented using sun.reflect.Reflection.getCallerClass if available, None otherwise.

        Hint: when comparing to Thread.currentThread().getStackTrace, add two levels.

      • findMarker

        public static java.lang.reflect.Type findMarker​(java.lang.Class<?> root,
                                                        java.lang.Class<?> marker)