public final class CallStack extends Object
| Modifier and Type | Method and Description |
|---|---|
static Optional<Method> |
currentMethod()
Returns a reference to a method that was last invoked on a target object which has been enhanced for method
recording.
|
static Class<?> |
getCallerClass()
Returns the caller class of the calling method.
For example: A.calling() -> B.called() B.called() -> getCallerClass(): A If a thread context classloader is defined, it will be used for loading the class, otherwise the default class loader is used. |
static <T> T |
track(T target)
Enhances the target object to track the invocation of methods of the target.
|
public static <T> T track(T target)
currentMethod()T - the type of the tracked objecttarget - the target object whose method invocations should be trackedcurrentMethod() callpublic static Optional<Method> currentMethod()
public static Class<?> getCallerClass()
Copyright © 2016 DevCon5 GmbH. All rights reserved.