net.sf.ant4eclipse.ant.condition
Class HasBuildCommand

java.lang.Object
  extended by ProjectComponent
      extended by net.sf.ant4eclipse.ant.condition.HasBuildCommand

public class HasBuildCommand
extends ProjectComponent

The HasBuildCommand implements a condition to test whether a eclipse project has a specific build command or not


Constructor Summary
HasBuildCommand()
          Creates a new instance of type HasBuildCommand.
 
Method Summary
 boolean eval()
          Returns true if the eclipse project contains the requested buildCommand
 boolean isBuildCommandSet()
          Returns true if the build command has been set.
 void requireBuildCommandSet()
          Throws a build exception if a build command is not set.
 void setBuildCommand(java.lang.String command)
          Sets the name of the build command.
 void setProject(java.io.File project)
          Sets the project.
 void setProjectName(java.lang.String project)
          Sets the name of the project.
 void setWorkspace(java.io.File workspace)
          Sets the workspace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HasBuildCommand

public HasBuildCommand()
Creates a new instance of type HasBuildCommand.

Method Detail

eval

public boolean eval()
             throws BuildException
Returns true if the eclipse project contains the requested buildCommand

Returns:
true if the eclipse project contains the requested buildCommand.
Throws:
BuildException

setBuildCommand

public void setBuildCommand(java.lang.String command)
Sets the name of the build command.

Parameters:
command - name of the build command.

isBuildCommandSet

public boolean isBuildCommandSet()
Returns true if the build command has been set.

Returns:
true if the build command has been set.

requireBuildCommandSet

public final void requireBuildCommandSet()
Throws a build exception if a build command is not set.


setProjectName

public void setProjectName(java.lang.String project)
Sets the name of the project.

Parameters:
project - the name of the project.

setWorkspace

public void setWorkspace(java.io.File workspace)
Sets the workspace.

Parameters:
workspace - the workspace.

setProject

public void setProject(java.io.File project)
Sets the project.

Parameters:
project - the project.