public class SpringPlugin extends java.lang.Object implements LoadtimeInstrumentationPlugin, ReloadEventProcessorPlugin
| Modifier and Type | Field and Description |
|---|---|
static java.util.List<java.lang.Object> |
annotationMethodHandlerAdapterInstances |
static java.util.List<java.lang.Object> |
defaultAnnotationHandlerMappingInstances |
static java.util.List<java.lang.Object> |
localVariableTableParameterNameDiscovererInstances |
static java.util.List<java.lang.Object> |
requestMappingHandlerMappingInstances |
static boolean |
support305 |
| Constructor and Description |
|---|
SpringPlugin() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(java.lang.String slashedTypeName,
java.lang.ClassLoader classLoader,
java.security.ProtectionDomain protectionDomain,
byte[] bytes)
Called by the agent to determine if this plugin is interested in changing the specified type at load time.
|
byte[] |
modify(java.lang.String slashedClassName,
java.lang.ClassLoader classLoader,
byte[] bytes)
Once accept has returned true for a type, the modify method will be called to make the actual change to the
classfile bytes.
|
static void |
recordAnnotationMethodHandlerAdapterInstance(java.lang.Object obj) |
static void |
recordDefaultAnnotationHandlerMappingInstance(java.lang.Object obj) |
static void |
recordLocalVariableTableParameterNameDiscoverer(java.lang.Object obj) |
static void |
recordRequestMappingHandlerMappingInstance(java.lang.Object obj) |
void |
reloadEvent(java.lang.String typename,
java.lang.Class<?> clazz,
java.lang.String versionsuffix)
Called when a type has been reloaded.
|
boolean |
shouldRerunStaticInitializer(java.lang.String typename,
java.lang.Class<?> clazz,
java.lang.String encodedTimestamp)
Called when a type has been reloaded, allows the plugin to decide if the static initializer should be re-run for
the reloaded type.
|
public static java.util.List<java.lang.Object> annotationMethodHandlerAdapterInstances
public static java.util.List<java.lang.Object> defaultAnnotationHandlerMappingInstances
public static java.util.List<java.lang.Object> requestMappingHandlerMappingInstances
public static java.util.List<java.lang.Object> localVariableTableParameterNameDiscovererInstances
public static boolean support305
public boolean accept(java.lang.String slashedTypeName,
java.lang.ClassLoader classLoader,
java.security.ProtectionDomain protectionDomain,
byte[] bytes)
LoadtimeInstrumentationPluginaccept in interface LoadtimeInstrumentationPluginslashedTypeName - the type name, slashed form (e.g. java/lang/String)classLoader - the classloader loading the typeprotectionDomain - the ProtectionDomain for the class represented by the bytesbytes - the classfile contents for the typepublic byte[] modify(java.lang.String slashedClassName,
java.lang.ClassLoader classLoader,
byte[] bytes)
LoadtimeInstrumentationPluginmodify in interface LoadtimeInstrumentationPluginslashedClassName - the class name, slashed form (e.g. java/lang/String)classLoader - the classloader loading the typebytes - the classfile contents for the typepublic static void recordAnnotationMethodHandlerAdapterInstance(java.lang.Object obj)
public static void recordRequestMappingHandlerMappingInstance(java.lang.Object obj)
public static void recordLocalVariableTableParameterNameDiscoverer(java.lang.Object obj)
public static void recordDefaultAnnotationHandlerMappingInstance(java.lang.Object obj)
public void reloadEvent(java.lang.String typename,
java.lang.Class<?> clazz,
java.lang.String versionsuffix)
ReloadEventProcessorPluginreloadEvent in interface ReloadEventProcessorPlugintypename - the (dotted) type name, for example java.lang.Stringclazz - the Class object that has been reloadedversionsuffix - an encoded time stamp for this version, containing chars (A-Za-z0-9)public boolean shouldRerunStaticInitializer(java.lang.String typename,
java.lang.Class<?> clazz,
java.lang.String encodedTimestamp)
ReloadEventProcessorPluginshouldRerunStaticInitializer in interface ReloadEventProcessorPlugintypename - the (dotted) type name, for example java.lang.Stringclazz - the Class object that has been reloadedencodedTimestamp - an encoded time stamp for this version, containing chars (A-Za-z0-9)