01: /**
02: * Copyright (C) 2001-2005 France Telecom R&D
03: */package org.objectweb.speedo.generation.ejb;
04:
05: import org.objectweb.speedo.generation.AbstractEnhancer;
06: import org.objectweb.speedo.generation.api.GeneratorComponent;
07: import org.objectweb.speedo.generation.compiler.Compiler;
08: import org.objectweb.speedo.generation.enhancer.aware.PersistenceAwareEnhancer;
09: import org.objectweb.speedo.generation.enhancer.pc.PersistentClassEnhancer;
10: import org.objectweb.speedo.generation.generator.ejb.EJBGenerator;
11: import org.objectweb.speedo.generation.jorm.JormGenerator;
12: import org.objectweb.speedo.generation.jorm.JormMIGenerator;
13: import org.objectweb.speedo.generation.mivisitor.JMICleanerVisitor;
14: import org.objectweb.speedo.generation.mivisitor.ORMappingGenerator;
15: import org.objectweb.speedo.generation.mivisitor.ReverseFieldAdder;
16: import org.objectweb.speedo.generation.mivisitor.ejb.EJBSMIVisitor;
17: import org.objectweb.speedo.generation.parser.ejb.EJBAnnotationParser;
18: import org.objectweb.speedo.generation.parser.ejb.EJBPersistenceParser;
19: import org.objectweb.speedo.generation.recompiler.Recompiler;
20: import org.objectweb.speedo.generation.recompiler.UpToDateVisitor;
21: import org.objectweb.speedo.generation.serializer.MISerializer;
22: import org.objectweb.speedo.lib.Personality;
23:
24: /**
25: * This class is the enhancer for the EJB personality of Speedo.
26: *
27: * @author S.Chassande-Barrioz, P. Dechamboux
28: */
29: public class EJBEnhancer extends AbstractEnhancer {
30: /**
31: * Defines the different step of the Speedo EJB compiler/enhancer
32: */
33: private static final GeneratorComponent[] GC_GENCOMPS = new GeneratorComponent[] {
34: new EJBPersistenceParser(),
35: new UpToDateVisitor(Personality.EJB),
36: new Recompiler(Personality.EJB), new EJBAnnotationParser(),
37: new EJBSMIVisitor(),
38: new ReverseFieldAdder(Personality.EJB),
39: new ORMappingGenerator(Personality.EJB),
40: new JormMIGenerator(Personality.EJB),
41: new JormGenerator(Personality.EJB), new EJBGenerator(),
42: new MISerializer(Personality.EJB),
43: new PersistentClassEnhancer(Personality.EJB),
44: new PersistenceAwareEnhancer(Personality.EJB),
45: new JMICleanerVisitor(Personality.EJB),
46: new Compiler(Personality.EJB) };
47:
48: protected GeneratorComponent[] getGeneratorComponents() {
49: return GC_GENCOMPS;
50: }
51:
52: public EJBEnhancer() {
53: super(Personality.EJB);
54: }
55: }
|