Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

xdoclet
Class GenerationManager  view GenerationManager download GenerationManager.java

java.lang.Object
  extended byxdoclet.GenerationManager

public class GenerationManager
extends java.lang.Object

Verify if the generation is needed for Java files and Xml files based templates.

Version:
$Revision: 1.19 $

Field Summary
private  XJavaDoc _xJavaDoc
           
private  boolean guessGenerationNeeded
           
private static java.io.File newestJar
           
private static java.util.Map parserDb
           
private  TemplateSubTask subTask
           
 
Constructor Summary
GenerationManager(XJavaDoc xJavaDoc, TemplateSubTask subTask)
          Describe what the GenerationManager constructor does
 
Method Summary
private static java.util.Map getParserDb()
          Return (and construct) the template database.
private  boolean isClassHierarchyNewerThanFile(XClass clazz, java.io.File file)
           
private  boolean isClasspathNewerThanFile(java.io.File file)
           
 boolean isGenerationNeeded(java.io.File file)
          Verify if the generation of a file to generate is needed because either the Template used to generate the file have a later timestamp, or because ALL the Java sources imported in this task have a sooner timestamp.
private  boolean isGenerationNeeded(java.io.File file, java.net.URL templateURL)
          Verify if the generation of a file is needed because either the template file has a sooner timestamp, or because one of the merge files have a sooner timestamp
 boolean isGenerationNeeded(XClass clazz, java.io.File file, boolean withTemplate)
          Test if a Java source mmust be generated or not depending of timestamp of elements involved.
 boolean isGuessGenerationNeeded()
          Gets the GuessGenerationNeeded attribute of the GenerationManager object
private  boolean isTemplateNewerThanFile(boolean withTemplate, java.io.File file)
           
 void setGuessGenerationNeeded(boolean guessGenerationNeeded)
          Sets the GuessGenerationNeeded attribute of the GenerationManager object.
private static void updateParserDb(java.net.URL templateURL, java.lang.String[] files)
          During parsing we build the Template database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newestJar

private static final java.io.File newestJar

parserDb

private static java.util.Map parserDb

subTask

private final TemplateSubTask subTask

guessGenerationNeeded

private boolean guessGenerationNeeded

_xJavaDoc

private XJavaDoc _xJavaDoc
Constructor Detail

GenerationManager

public GenerationManager(XJavaDoc xJavaDoc,
                         TemplateSubTask subTask)
Describe what the GenerationManager constructor does

Method Detail

getParserDb

private static java.util.Map getParserDb()
Return (and construct) the template database. It is a map between a String representing the template file and an array of representing the merge files that are part of the generation.


updateParserDb

private static void updateParserDb(java.net.URL templateURL,
                                   java.lang.String[] files)
During parsing we build the Template database. We store it on file.


isGuessGenerationNeeded

public boolean isGuessGenerationNeeded()
Gets the GuessGenerationNeeded attribute of the GenerationManager object


isGenerationNeeded

public boolean isGenerationNeeded(XClass clazz,
                                  java.io.File file,
                                  boolean withTemplate)
                           throws XDocletException
Test if a Java source mmust be generated or not depending of timestamp of elements involved.


isGenerationNeeded

public boolean isGenerationNeeded(java.io.File file)
                           throws XDocletException
Verify if the generation of a file to generate is needed because either the Template used to generate the file have a later timestamp, or because ALL the Java sources imported in this task have a sooner timestamp. This is used to test if xml files generation is needed.


setGuessGenerationNeeded

public void setGuessGenerationNeeded(boolean guessGenerationNeeded)
Sets the GuessGenerationNeeded attribute of the GenerationManager object.


isClassHierarchyNewerThanFile

private boolean isClassHierarchyNewerThanFile(XClass clazz,
                                              java.io.File file)

isTemplateNewerThanFile

private boolean isTemplateNewerThanFile(boolean withTemplate,
                                        java.io.File file)
                                 throws XDocletException

isClasspathNewerThanFile

private boolean isClasspathNewerThanFile(java.io.File file)

isGenerationNeeded

private boolean isGenerationNeeded(java.io.File file,
                                   java.net.URL templateURL)
                            throws XDocletException
Verify if the generation of a file is needed because either the template file has a sooner timestamp, or because one of the merge files have a sooner timestamp