org.objectweb.speedo.generation.mivisitor
Class AbstractMetaInfoVisitor

java.lang.Object
  extended byorg.objectweb.speedo.generation.lib.AbstractGeneratorComponent
      extended byorg.objectweb.speedo.generation.mivisitor.AbstractMetaInfoVisitor
All Implemented Interfaces:
GeneratorComponent, MetaInfoVisitor
Direct Known Subclasses:
DataStoreIdAdder, ExtensionVerifier, FieldConverterVisitor, InheritanceVisitor, JavaLangShorcutVisitor, JMICleanerVisitor, KeyFieldChecker, MetaDataAnalyzer, MetaInfoVisitorImpl, PrimaryKeyFieldAdder, ReverseFieldAdder, TupleExtensionCopier, VersionFieldAdder

public class AbstractMetaInfoVisitor
extends AbstractGeneratorComponent
implements MetaInfoVisitor

Author:
S.Chassande-Barrioz

Field Summary
static java.lang.String LOGGER_NAME
           
 
Fields inherited from class org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
debug, logger, scp
 
Constructor Summary
AbstractMetaInfoVisitor()
          builds a MetaInfoVisitor which is the last of the chain
AbstractMetaInfoVisitor(MetaInfoVisitor mim)
          builds a MetaInfoVisitor which is the last of the chain
 
Method Summary
protected  java.lang.String getLoggerName()
           
 MetaInfoVisitor getNext()
           
protected static SpeedoClass getSpeedoClass(java.lang.Object o)
          Helper method able to find the SpeedoClass hosting a Speedo meta object.
 boolean init()
           
 void process()
           
 void setNext(MetaInfoVisitor next)
           
 void visitClass(SpeedoClass sc)
           
 void visitCompilerParameter(SpeedoCompilerParameter scp)
           
 void visitExtension(SpeedoExtension se)
           
 void visitField(SpeedoField sf)
           
 void visitPackage(SpeedoPackage sp)
           
 void visitXml(SpeedoXMLDescriptor xml)
           
 
Methods inherited from class org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
getLogger, getSpeedoCompilerParameter, setLogger, setSpeedoCompilerParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER_NAME

public static final java.lang.String LOGGER_NAME
See Also:
Constant Field Values
Constructor Detail

AbstractMetaInfoVisitor

public AbstractMetaInfoVisitor()
builds a MetaInfoVisitor which is the last of the chain


AbstractMetaInfoVisitor

public AbstractMetaInfoVisitor(MetaInfoVisitor mim)
builds a MetaInfoVisitor which is the last of the chain

Method Detail

getLoggerName

protected java.lang.String getLoggerName()

init

public boolean init()
             throws SpeedoException
Specified by:
init in interface GeneratorComponent
Specified by:
init in class AbstractGeneratorComponent
Throws:
SpeedoException

process

public void process()
             throws SpeedoException
Specified by:
process in interface GeneratorComponent
Specified by:
process in class AbstractGeneratorComponent
Throws:
SpeedoException

getNext

public MetaInfoVisitor getNext()
Specified by:
getNext in interface MetaInfoVisitor

setNext

public void setNext(MetaInfoVisitor next)
Specified by:
setNext in interface MetaInfoVisitor

visitCompilerParameter

public void visitCompilerParameter(SpeedoCompilerParameter scp)
                            throws SpeedoException
Specified by:
visitCompilerParameter in interface MetaInfoVisitor
Throws:
SpeedoException

visitXml

public void visitXml(SpeedoXMLDescriptor xml)
              throws SpeedoException
Specified by:
visitXml in interface MetaInfoVisitor
Throws:
SpeedoException

visitPackage

public void visitPackage(SpeedoPackage sp)
                  throws SpeedoException
Specified by:
visitPackage in interface MetaInfoVisitor
Throws:
SpeedoException

visitClass

public void visitClass(SpeedoClass sc)
                throws SpeedoException
Specified by:
visitClass in interface MetaInfoVisitor
Throws:
SpeedoException

visitField

public void visitField(SpeedoField sf)
                throws SpeedoException
Specified by:
visitField in interface MetaInfoVisitor
Throws:
SpeedoException

visitExtension

public void visitExtension(SpeedoExtension se)
                    throws SpeedoException
Specified by:
visitExtension in interface MetaInfoVisitor
Throws:
SpeedoException

getSpeedoClass

protected static SpeedoClass getSpeedoClass(java.lang.Object o)
Helper method able to find the SpeedoClass hosting a Speedo meta object. if the specified object is not a child (directly or not) of a SpeedoClass then a null value is returned.

Parameters:
o - is a child (directly or not) of SpeedoClass (supported types: SpeedoClass, SpeedoField, SpeedoTuple, SpeedoExtension)