01: /**
02: * Copyright (C) 2001-2005 France Telecom R&D
03: */package org.objectweb.speedo.generation.jdo;
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.jdo.JDOPersistentClassEnhancer;
10: import org.objectweb.speedo.generation.generator.jdo.JDOGenerator;
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.jdo.JDOSMIVisitor;
16: import org.objectweb.speedo.generation.parser.jdo.JDO2Parser;
17: import org.objectweb.speedo.generation.recompiler.Recompiler;
18: import org.objectweb.speedo.generation.recompiler.UpToDateVisitor;
19: import org.objectweb.speedo.generation.serializer.MISerializer;
20: import org.objectweb.speedo.lib.Personality;
21:
22: /**
23: * This class is the enhancer for the JDO personality of Speedo.
24: *
25: * @author S.Chassande-Barrioz
26: */
27: public class JDOEnhancer extends AbstractEnhancer {
28:
29: /**
30: * Defines the different step of the Speedo JDO compiler/enhancer
31: */
32: private static final GeneratorComponent[] GC_GENCOMPS = new GeneratorComponent[] {
33: new JDO2Parser(), new UpToDateVisitor(Personality.JDO),
34: new Recompiler(Personality.JDO), new JDOSMIVisitor(),
35: new ORMappingGenerator(Personality.JDO),
36: new JormMIGenerator(Personality.JDO),
37: new JormGenerator(Personality.JDO),
38: new JDOGenerator(Personality.JDO),
39: new MISerializer(Personality.JDO),
40: new JDOPersistentClassEnhancer(),
41: new PersistenceAwareEnhancer(Personality.JDO),
42: new JMICleanerVisitor(Personality.JDO),
43: new Compiler(Personality.JDO), };
44:
45: protected GeneratorComponent[] getGeneratorComponents() {
46: return GC_GENCOMPS;
47: }
48:
49: public JDOEnhancer() {
50: super(Personality.JDO);
51: }
52: }
|