org.jboss.aop.instrument
Class Codifier

java.lang.Object
  extended by org.jboss.aop.instrument.Codifier

public class Codifier
extends Object

Register pending codes, so that they can be added to a class bytecode in a later moment.

Author:
Flavia Rainone

Constructor Summary
Codifier()
          Constructor.
 
Method Summary
 void addPendingCode(javassist.CtMethod method, String body)
          Register the body of method as a pending code.
 void codifyPending()
          Deploys pending code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Codifier

public Codifier()
Constructor.

Method Detail

addPendingCode

public void addPendingCode(javassist.CtMethod method,
                           String body)
Register the body of method as a pending code.

Parameters:
method - the method whose body will be coded in a later moment.
body - the future body of method.

codifyPending

public void codifyPending()
                   throws javassist.CannotCompileException
Deploys pending code. In other words: changes the body of methods to their pending bodies, which must have been registered through addPendingCode method.

Throws:
javassist.CannotCompileException - thrown if javassist cannot compile a pending code, registered through addPendingCode method.


Copyright © 2008 JBoss, a division of Red Hat, Inc.. All Rights Reserved.