org.objectweb.speedo.generation.recompiler
Class UpToDateVisitor

java.lang.Object
  extended by org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
      extended by org.objectweb.speedo.generation.mivisitor.AbstractMetaInfoVisitor
          extended by org.objectweb.speedo.generation.mivisitor.MetaInfoVisitorImpl
              extended by org.objectweb.speedo.generation.recompiler.UpToDateVisitor
All Implemented Interfaces:
GeneratorComponent, MetaInfoVisitor

public class UpToDateVisitor
extends MetaInfoVisitorImpl

Checks the date of the source and the built files: - .jdo / JMI file - .java / .class For each .jdo file, if the .jdo or a .java has been modified all classes are removed in order to re-enhance all classed. TODO: check aware classes

Author:
S.Chassande-Barrioz

Field Summary
 
Fields inherited from class org.objectweb.speedo.generation.mivisitor.AbstractMetaInfoVisitor
LOGGER_NAME
 
Fields inherited from class org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
debug, logger, personality, scp
 
Constructor Summary
UpToDateVisitor(MetaInfoVisitor mim, Personality p)
          builds a MetaInfoVisitor which is the last of the chain
UpToDateVisitor(Personality p)
          builds a MetaInfoVisitor which is the last of the chain
 
Method Summary
protected  java.lang.String getLoggerName()
           
 java.lang.String getTitle()
           
 boolean init()
          Initializes the component
 void visitClass(SpeedoClass sc)
           
 void visitCompilerParameter(SpeedoCompilerParameter scp)
           
 void visitXml(SpeedoXMLDescriptor xml)
           
 
Methods inherited from class org.objectweb.speedo.generation.mivisitor.MetaInfoVisitorImpl
visitField, visitPackage
 
Methods inherited from class org.objectweb.speedo.generation.mivisitor.AbstractMetaInfoVisitor
getNext, getSpeedoClass, process, setNext, visitEnd, visitEndClass, visitExtension, visitIndex, visitSequence
 
Methods inherited from class org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
getLogger, getSpeedoCompilerParameter, getSummary, setLogger, setSpeedoCompilerParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpToDateVisitor

public UpToDateVisitor(Personality p)
builds a MetaInfoVisitor which is the last of the chain


UpToDateVisitor

public UpToDateVisitor(MetaInfoVisitor mim,
                       Personality p)
builds a MetaInfoVisitor which is the last of the chain

Method Detail

getLoggerName

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

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface GeneratorComponent
Overrides:
getTitle in class AbstractGeneratorComponent
Returns:
a short string (less than 30 characters) representing the title of the component. This string must indicate job of the component.

init

public boolean init()
             throws SpeedoException
Description copied from interface: GeneratorComponent
Initializes the component

Specified by:
init in interface GeneratorComponent
Overrides:
init in class AbstractMetaInfoVisitor
Returns:
boolean value indicating if the process method can be called.
Throws:
SpeedoException - if the component initialization fails

visitCompilerParameter

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

visitXml

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

visitClass

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