public class InterceptorInstanceLoader extends Object
InterceptorInstanceLoader is a classes finder and container.
This is a very important class in sky-walking's auto-instrumentation mechanism. If you want to fully understand why need this, and how it works, you need have knowledge about Classloader appointment mechanism.
Created by wusheng on 16/8/2.
| Constructor and Description |
|---|
InterceptorInstanceLoader() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
load(String className,
ClassLoader targetClassLoader)
Load an instance of interceptor, and keep it singleton.
|
public static <T> T load(String className, ClassLoader targetClassLoader) throws IllegalAccessException, InstantiationException, ClassNotFoundException, AgentPackageNotFoundException
AgentClassLoader for each targetClassLoader, as an extend classloader.
It can load interceptor classes from plugins, activations folders.T - expected typeclassName - the interceptor class, which is expected to be foundtargetClassLoader - the class loader for current application contextIllegalAccessExceptionInstantiationExceptionClassNotFoundExceptionAgentPackageNotFoundExceptionCopyright © 2019 The Apache Software Foundation. All rights reserved.