org.apache.anteater.test.meta
Class VersionChecker

java.lang.Object
  |
  +--org.apache.anteater.test.meta.AbstractChecker
        |
        +--org.apache.anteater.test.meta.ExistenceChecker
              |
              +--org.apache.anteater.test.meta.VersionChecker
All Implemented Interfaces:
FeatureChecker

public class VersionChecker
extends ExistenceChecker

.

Version:
$Revision: 1.1 $ $Date: 2002/10/17 10:21:15 $
Author:
Jeff Turner

Field Summary
 
Fields inherited from class org.apache.anteater.test.meta.AbstractChecker
features
 
Constructor Summary
VersionChecker()
           
 
Method Summary
 String checkFeature(Feature f)
          Check whether this Anteater installation has a feature.
 boolean compatible(String required, String lower, String upper)
          Checks if the script version is supported.
 String[] getCheckedFeatures()
          Gets an array of names of features that the implementing FeatureChecker can process.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VersionChecker

public VersionChecker()
Method Detail

getCheckedFeatures

public String[] getCheckedFeatures()
Description copied from interface: FeatureChecker
Gets an array of names of features that the implementing FeatureChecker can process.

Specified by:
getCheckedFeatures in interface FeatureChecker
Overrides:
getCheckedFeatures in class ExistenceChecker

checkFeature

public String checkFeature(Feature f)
Description copied from interface: FeatureChecker
Check whether this Anteater installation has a feature.

Specified by:
checkFeature in interface FeatureChecker
Overrides:
checkFeature in class ExistenceChecker
Parameters:
f - The feature we require.
Returns:
A String error message if the feature is missing, or null if the feature is present.

compatible

public boolean compatible(String required,
                          String lower,
                          String upper)
Checks if the script version is supported.

Parameters:
required - The script version
lower - The lowest version supported by this Anteater installation
upper - The highest version supported by this Anteater installation. Overstepping the upper bound is not necessarily a problem.
Returns:
Whether this Anteater can run this script.

toString

public String toString()
Overrides:
toString in class Object


Ant Functional Tester -- see Project home page for details