/** * The routine which actually does the real bytecode transformation. this is public because it * needs to be callable from the type checker script. In normal running the javaagent is the only * class which has a handle on the registered transformer so it is the only one which can reach * this point. * * @param ruleScript the script * @param loader the loader of the class being injected into * @param className the name of the class being injected into * @param targetClassBytes the current class bytecode * @return the transformed bytecode or NULL if no transform was applied */ public byte[] transform( RuleScript ruleScript, ClassLoader loader, String className, byte[] targetClassBytes) { TransformContext transformContext = new TransformContext(this, ruleScript, className, loader, helperManager); return transformContext.transform(targetClassBytes); }
/** * Set the parent of this figure. A null argument means that the figure is being removed from its * parent. No checks are performed to see if the figure already has a parent -- it is the * responsibility of the caller to do this, and to change the layer reference of the figure if * necessary. This method is intended only for use by classes that implement FigureContainer. */ public void setParent(CanvasComponent fc) { _parent = fc; TransformContext c = getTransformContext(); if (c != null) { c.invalidateCache(); } }