org.jboss.aop.instrument
Class OptimizedConstructorInvocations

java.lang.Object
  extended by org.jboss.aop.instrument.OptimizedInvocations
      extended by org.jboss.aop.instrument.OptimizedBehaviourInvocations
          extended by org.jboss.aop.instrument.OptimizedConstructorInvocations

public class OptimizedConstructorInvocations
extends OptimizedBehaviourInvocations

Comment

Version:
$Revision$
Author:
Kabir Khan

Field Summary
 
Fields inherited from class org.jboss.aop.instrument.OptimizedBehaviourInvocations
ENFORCE_ARGS_CONSISTENCY, INVOKE_TARGET
 
Constructor Summary
OptimizedConstructorInvocations()
           
 
Method Summary
static void addDispatch(javassist.CtClass invocation, String methodName, javassist.CtConstructor constructor)
          Creates a method that dispatches execution to a constructor joinpoint, and adds this method to invocation class.
protected static String createOptimizedInvocationClass(Instrumentor instrumentor, javassist.CtClass clazz, javassist.CtConstructor con, int index)
           
protected static String getOptimizedInvocationClassName(javassist.CtClass declaringClazz, int constructorIndex)
          Returns the name of the optimized Invocation class.
 
Methods inherited from class org.jboss.aop.instrument.OptimizedBehaviourInvocations
addArgumentFieldsAndAccessors, addDispatch, setArguments
 
Methods inherited from class org.jboss.aop.instrument.OptimizedInvocations
defrostClassIfExists, makeInvocationClass, makeInvocationClassNoCtors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptimizedConstructorInvocations

public OptimizedConstructorInvocations()
Method Detail

getOptimizedInvocationClassName

protected static String getOptimizedInvocationClassName(javassist.CtClass declaringClazz,
                                                        int constructorIndex)
Returns the name of the optimized Invocation class.

Parameters:
declaringClazz - the class that contains the constructor.
constructorIndex - the index of the constructor.
Returns:
the name of the optimized Invocation class.

createOptimizedInvocationClass

protected static String createOptimizedInvocationClass(Instrumentor instrumentor,
                                                       javassist.CtClass clazz,
                                                       javassist.CtConstructor con,
                                                       int index)
                                                throws javassist.NotFoundException,
                                                       javassist.CannotCompileException
Throws:
javassist.NotFoundException
javassist.CannotCompileException

addDispatch

public static final void addDispatch(javassist.CtClass invocation,
                                     String methodName,
                                     javassist.CtConstructor constructor)
                              throws javassist.NotFoundException,
                                     javassist.CannotCompileException
Creates a method that dispatches execution to a constructor joinpoint, and adds this method to invocation class.

Parameters:
invocation - invocation class
methodName - name of method to create
constructor - constructor to be executed on dispatch
Throws:
javassist.NotFoundException
javassist.CannotCompileException


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