ConForM.CoopnTools.CoKer
Class CoopnCompilInfo

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.CoopnCompilInfo
All Implemented Interfaces:
java.lang.Cloneable

public class CoopnCompilInfo
extends java.lang.Object
implements java.lang.Cloneable

Compilation information. This class stores usefull information about compiled modules. This information includes the timestamp associated to the compiled module, and its filename.


Constructor Summary
CoopnCompilInfo(java.lang.String fileName, CoopnTimestamp timestamp)
          Simple cronstructor.
 
Method Summary
 void addCompilationDependencies(CoopnCompilInfo anotherInfo)
          Add new compilation dependencies.
 void addCompilationDependency(java.lang.String module)
          Add a new compilation dependency.
 void addCompilationDependency(java.lang.String module, CoopnTimestamp timestamp)
          Add a new compilation dependency.
 java.lang.Object clone()
           
 java.lang.String[] compilationDependencies()
          Static (compilation) dependencies of the module.
 boolean equals(java.lang.Object obj)
           
 java.lang.String fileName()
           
 int hashCode()
           
 CoopnTimestamp timestamp()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoopnCompilInfo

public CoopnCompilInfo(java.lang.String fileName,
                       CoopnTimestamp timestamp)
Simple cronstructor.
Parameters:
fileName - The name of the source file (or null iff the module if not compiled from a source file, but build in memory, such as co-opn instantiated modules for instance)
timestamp - the timestamp of the module. Usually, the compiled module is to be considered as up-to-date iff its timestamp is sooner than the timestamp of every modules contained in the string array return by the method compilationDependencies.
Method Detail

addCompilationDependency

public void addCompilationDependency(java.lang.String module)
Add a new compilation dependency. No effect if the compilation dependency was already registered.
Parameters:
module - the dependency

addCompilationDependency

public void addCompilationDependency(java.lang.String module,
                                     CoopnTimestamp timestamp)
Add a new compilation dependency. No effect if the compilation dependency was already registered. In addition, ensures the timestamp.
Parameters:
module - the dependency
timestamp - the timestamp; if this timestamp is later than the current timestamp, it becomes the current timestamp

addCompilationDependencies

public void addCompilationDependencies(CoopnCompilInfo anotherInfo)
Add new compilation dependencies. These dependencies are defined by another compilation information. In addition, ensures the timestamp
Parameters:
info - the other compilation information

fileName

public java.lang.String fileName()

timestamp

public CoopnTimestamp timestamp()

compilationDependencies

public java.lang.String[] compilationDependencies()
Static (compilation) dependencies of the module. The static dependencies of the modules are the modules upon which this module depends for its compilation. In other words, when such a module is modified, the current module should be recompiled.
Returns:
an array of string, containing the name of the modules upon which this module depends for its compilation.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object