|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectakka.util.Reflect
public class Reflect
Collection of internal reflection utilities which may or may not be available (most services specific to HotSpot, but fails gracefully).
INTERNAL API
Constructor Summary | |
---|---|
Reflect()
|
Method Summary | ||
---|---|---|
static
|
findConstructor(java.lang.Class<T> clazz,
scala.collection.immutable.Seq<java.lang.Object> args)
INTERNAL API Implements a primitive form of overload resolution a.k.a. |
|
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. |
|
static
|
instantiate(java.lang.Class<T> clazz)
INTERNAL API |
|
static
|
instantiate(java.lang.Class<T> clazz,
scala.collection.immutable.Seq<java.lang.Object> args)
INTERNAL API Calls findConstructor and invokes it with the given arguments. |
|
static
|
instantiate(java.lang.reflect.Constructor<T> constructor,
scala.collection.immutable.Seq<java.lang.Object> args)
INTERNAL API Invokes the constructor with the the given arguments. |
|
static
|
instantiator(java.lang.Class<T> clazz)
INTERNAL API |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Reflect()
Method Detail |
---|
public static scala.Option<scala.Function1<java.lang.Object,java.lang.Class<?>>> getCallerClass()
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.
public static <T> T instantiate(java.lang.Class<T> clazz)
clazz
- the class which to instantiate an instance of
public static <T> T instantiate(java.lang.Class<T> clazz, scala.collection.immutable.Seq<java.lang.Object> args)
clazz
- (undocumented)args
- (undocumented)
public static <T> T instantiate(java.lang.reflect.Constructor<T> constructor, scala.collection.immutable.Seq<java.lang.Object> args)
constructor
- (undocumented)args
- (undocumented)
public static <T> java.lang.reflect.Constructor<T> findConstructor(java.lang.Class<T> clazz, scala.collection.immutable.Seq<java.lang.Object> args)
clazz
- (undocumented)args
- (undocumented)
public static <T> scala.Function0<T> instantiator(java.lang.Class<T> clazz)
clazz
- the class which to instantiate an instance of
public static java.lang.reflect.Type findMarker(java.lang.Class<?> root, java.lang.Class<?> marker)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |