/** * uninstall all transforms associated with this script. this is called after marking the script as * deleted and regenerating the methods for any associated transformed class to ensure that it does * not cause a rule trigger call to fail. */ public synchronized void purge() { for (TransformSet transformSet : transformSets) { for (Transform transform : transformSet.getTransforms()) { Rule rule = transform.getRule(); if(rule != null) { rule.purge(); } } transformSet.clearTransforms(); } transformSets.clear(); }
/** * uninstall all transforms associated with this script. this is called after marking the script as * deleted and regenerating the methods for any associated transformed class to ensure that it does * not cause a rule trigger call to fail. */ public synchronized void purge() { for (TransformSet transformSet : transformSets) { for (Transform transform : transformSet.getTransforms()) { Rule rule = transform.getRule(); if(rule != null) { rule.purge(); } } transformSet.clearTransforms(); } transformSets.clear(); }
/** * delete any transforms associated with a specific trigger class and loader for * deletion. this is called just before any attempt to retransform the class * to inject the script's associated rule. it ensures that records of previous * transforms associated with a prior retransformation of the class are removed * before any new ones are added */ public synchronized void purge(ClassLoader loader, String triggerClassName) { TransformSet transformSet = lookupTransformSet(loader, triggerClassName); if (transformSet != null) { for (Transform transform : transformSet.getTransforms()) { Rule rule = transform.getRule(); if(rule != null) { rule.purge(); } } transformSet.clearTransforms(); } }
/** * delete any transforms associated with a specific trigger class and loader for * deletion. this is called just before any attempt to retransform the class * to inject the script's associated rule. it ensures that records of previous * transforms associated with a prior retransformation of the class are removed * before any new ones are added */ public synchronized void purge(ClassLoader loader, String triggerClassName) { TransformSet transformSet = lookupTransformSet(loader, triggerClassName); if (transformSet != null) { for (Transform transform : transformSet.getTransforms()) { Rule rule = transform.getRule(); if(rule != null) { rule.purge(); } } transformSet.clearTransforms(); } }