Class JavaAgentClassRegisterImpl
java.lang.Object
org.powermock.modules.agent.support.JavaAgentClassRegisterImpl
- All Implemented Interfaces:
JavaAgentClassRegister
Basic not thread-safety implementation of the
JavaAgentClassRegister
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Remove all registered classes for all class loaders.boolean
isModifiedByAgent
(ClassLoader classLoader, String className) Check if class withclassName
has been modified for the given class loadervoid
registerClass
(ClassLoader loader, String className) Register that the class with nameclassName
has been modified for the given class loader.
-
Field Details
-
modifiedClasses
-
-
Constructor Details
-
JavaAgentClassRegisterImpl
public JavaAgentClassRegisterImpl()
-
-
Method Details
-
isModifiedByAgent
Description copied from interface:JavaAgentClassRegister
Check if class withclassName
has been modified for the given class loader- Specified by:
isModifiedByAgent
in interfaceJavaAgentClassRegister
- Parameters:
classLoader
- -ClassLoader
for that class should be checkedclassName
- - name of class- Returns:
true
if the given class has been modified, otherwisefalse
-
registerClass
Description copied from interface:JavaAgentClassRegister
Register that the class with nameclassName
has been modified for the given class loader.- Specified by:
registerClass
in interfaceJavaAgentClassRegister
- Parameters:
loader
- -ClassLoader
for that class has been modified.className
- - name of the class which has been modified.
-
clear
public void clear()Description copied from interface:JavaAgentClassRegister
Remove all registered classes for all class loaders.- Specified by:
clear
in interfaceJavaAgentClassRegister
-