org.apache.openejb.core.cmp.cmp2
Class PostCreateGenerator

java.lang.Object
  extended by org.apache.openejb.core.cmp.cmp2.PostCreateGenerator

public class PostCreateGenerator
extends java.lang.Object

Generate concrete implementations of EjbPostCreatexxx methods for a bean class. This is implemented in a separate class because it is used by both the CMP1 and CMP2 generators.

Version:
$Rev: 777557 $ $Date: 2009-05-22 17:00:34 +0200 (Fr, 22. Mai 2009) $

Constructor Summary
PostCreateGenerator(java.lang.Class beanClass, org.apache.xbean.asm.ClassWriter cw)
          Constructor for a PostCreateGenerator.
 
Method Summary
 void createEjbPostCreate(java.lang.String ejbPostCreateName, java.lang.reflect.Method ejbCreate)
          Generate an ejbPostCreatexxxx method corresponding to an ejbCreatexxxx method definition.
 void generate()
          Generate the ejbPostCreatexxxx methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostCreateGenerator

public PostCreateGenerator(java.lang.Class beanClass,
                           org.apache.xbean.asm.ClassWriter cw)
Constructor for a PostCreateGenerator.

Parameters:
beanClass - The source EJB implementation class (the user provided class).
cw - The ClassWriter instance used for constructing the instantiation class. This has already gone through other generation steps, we're implementing additional stages of the process.
Method Detail

generate

public void generate()
Generate the ejbPostCreatexxxx methods. Inorder to be considered for generation, there must A) be a corresponding ejbCreatexxxx method and B) the target method must either not exist or exist but be abstract.


createEjbPostCreate

public void createEjbPostCreate(java.lang.String ejbPostCreateName,
                                java.lang.reflect.Method ejbCreate)
Generate an ejbPostCreatexxxx method corresponding to an ejbCreatexxxx method definition. These provided methods are just empty stubs.

Parameters:
ejbPostCreateName - The name we're creating under.
ejbCreate - The matching ejbCreate method. The post create method will match this one in terms of method signature.


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.