org.objectweb.speedo.genclass.merger.ejb
Class EJBGenClassMerger

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.MatchingTask
              extended by org.objectweb.speedo.genclass.merger.GenClassMerger
                  extended by org.objectweb.speedo.genclass.merger.ejb.EJBGenClassMerger
All Implemented Interfaces:
org.apache.tools.ant.types.selectors.SelectorContainer

public class EJBGenClassMerger
extends GenClassMerger

Generate the sub class of the generic class dedicated to JDO.

Author:
S.Chassande-Barrioz, P. Dechamboux

Field Summary
static java.lang.String EJB_GEN_CLASS_NAME
           
 
Fields inherited from class org.objectweb.speedo.genclass.merger.GenClassMerger
GEN_CLASS_NAME, logger, LOGGER_NAME, personality
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
EJBGenClassMerger()
           
 
Method Summary
protected  java.lang.String getClassToWrite(java.lang.String gcn)
          The class to write is into the sub package 'jdo' and the name is prefixed by JDO.
protected  java.lang.String getLoggerName()
           
protected  java.lang.String getSecondClass(java.lang.String gcn)
          The second class is the defined by #EJB_GEN_CLASS_NAME
protected  boolean requireEnhancement(GCInfo gc)
          return false if the class already implement a mandatory interface for persistent object, else true.
protected  void writeFirstClass(GCInfo gc, org.objectweb.asm.ClassVisitor current)
          There is no first class, because the class is created.
protected  void writeSecondClass(GCInfo gc, org.objectweb.asm.ClassVisitor current)
          Add a no arg constructor in addition to the normal behavior
 
Methods inherited from class org.objectweb.speedo.genclass.merger.GenClassMerger
checkAfter, execute, getFirstClass, getSrc, loadJavaClass, mergeGenClass, newGCInfo, setSrc, writeJavaClass
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EJB_GEN_CLASS_NAME

public static final java.lang.String EJB_GEN_CLASS_NAME
Constructor Detail

EJBGenClassMerger

public EJBGenClassMerger()
Method Detail

getLoggerName

protected java.lang.String getLoggerName()
Overrides:
getLoggerName in class GenClassMerger

getClassToWrite

protected java.lang.String getClassToWrite(java.lang.String gcn)
The class to write is into the sub package 'jdo' and the name is prefixed by JDO.

Overrides:
getClassToWrite in class GenClassMerger

getSecondClass

protected final java.lang.String getSecondClass(java.lang.String gcn)
The second class is the defined by #EJB_GEN_CLASS_NAME

Overrides:
getSecondClass in class GenClassMerger

requireEnhancement

protected boolean requireEnhancement(GCInfo gc)
return false if the class already implement a mandatory interface for persistent object, else true.

Overrides:
requireEnhancement in class GenClassMerger

writeFirstClass

protected void writeFirstClass(GCInfo gc,
                               org.objectweb.asm.ClassVisitor current)
                        throws SpeedoException
There is no first class, because the class is created.

Overrides:
writeFirstClass in class GenClassMerger
Throws:
SpeedoException

writeSecondClass

protected void writeSecondClass(GCInfo gc,
                                org.objectweb.asm.ClassVisitor current)
                         throws SpeedoException
Add a no arg constructor in addition to the normal behavior

Overrides:
writeSecondClass in class GenClassMerger
Throws:
SpeedoException