public class Spy extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
AFTER_INVOKE |
static Method |
AFTER_INVOKING_METHOD |
static Method |
AGENT_RESET_METHOD
代理重设方法
|
static String |
BEFORE_INVOKE |
static Method |
BEFORE_INVOKING_METHOD |
static ClassLoader |
CLASSLOADER
arthas's classloader 引用
|
static String |
ON_BEFORE |
static Method |
ON_BEFORE_METHOD |
static String |
ON_RETURN |
static Method |
ON_RETURN_METHOD |
static String |
ON_THROWS |
static Method |
ON_THROWS_METHOD |
static String |
THROW_INVOKE |
static Method |
THROW_INVOKING_METHOD |
| Constructor and Description |
|---|
Spy() |
| Modifier and Type | Method and Description |
|---|---|
static void |
destroy()
Clean up the reference to com.taobao.arthas.agent.AgentLauncher$1
to avoid classloader leak.
|
static void |
init(ClassLoader classLoader,
Method onBeforeMethod,
Method onReturnMethod,
Method onThrowsMethod,
Method beforeInvokingMethod,
Method afterInvokingMethod,
Method throwInvokingMethod)
用于普通的间谍初始化
|
static void |
methodOnBegin(int adviceId,
ClassLoader loader,
String className,
String methodName,
String methodDesc,
Object target,
Object[] args)
empty method
|
static void |
methodOnInvokeAfterTracing(int adviceId,
String owner,
String name,
String desc,
int lineNumber) |
static void |
methodOnInvokeBeforeTracing(int adviceId,
String owner,
String name,
String desc,
int lineNumber) |
static void |
methodOnInvokeThrowTracing(int adviceId,
String owner,
String name,
String desc,
int lineNumber) |
static void |
methodOnReturnEnd(Object returnObject)
empty method
|
static void |
methodOnThrowingEnd(Throwable throwable) |
public static final String ON_BEFORE
public static final String ON_RETURN
public static final String ON_THROWS
public static final String BEFORE_INVOKE
public static final String AFTER_INVOKE
public static final String THROW_INVOKE
public static volatile Method ON_BEFORE_METHOD
public static volatile Method ON_RETURN_METHOD
public static volatile Method ON_THROWS_METHOD
public static volatile Method BEFORE_INVOKING_METHOD
public static volatile Method AFTER_INVOKING_METHOD
public static volatile Method THROW_INVOKING_METHOD
public static volatile ClassLoader CLASSLOADER
public static volatile Method AGENT_RESET_METHOD
public static void init(ClassLoader classLoader, Method onBeforeMethod, Method onReturnMethod, Method onThrowsMethod, Method beforeInvokingMethod, Method afterInvokingMethod, Method throwInvokingMethod)
public static void destroy()
public static void methodOnBegin(int adviceId,
ClassLoader loader,
String className,
String methodName,
String methodDesc,
Object target,
Object[] args)
adviceId - loader - className - methodName - methodDesc - target - args - com.taobao.arthas.core.advisor.AdviceWeaver#methodOnBegin(int,
ClassLoader, String, String, String, Object, Object[])public static void methodOnReturnEnd(Object returnObject)
returnObject - com.taobao.arthas.core.advisor.AdviceWeaver#methodOnReturnEnd(Object)public static void methodOnThrowingEnd(Throwable throwable)
public static void methodOnInvokeBeforeTracing(int adviceId,
String owner,
String name,
String desc,
int lineNumber)
public static void methodOnInvokeAfterTracing(int adviceId,
String owner,
String name,
String desc,
int lineNumber)
Copyright © 2020. All rights reserved.