net.sf.ant4eclipse.ant.condition
Class HasNature

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

public class HasNature
extends ProjectComponent

An ant condition that allows to check if a project has a specific nature.


Constructor Summary
HasNature()
          Creates a new instance of type HasNature.
 
Method Summary
 boolean eval()
          
 boolean isNatureSet()
          Returns true if the nature has been set.
 void requireNatureSet()
          Makes sure the nature attribute has been set.
 void setNature(java.lang.String nature)
          Sets the nature to check for.
 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

HasNature

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

Method Detail

eval

public boolean eval()
             throws BuildException

Throws:
BuildException

setNature

public void setNature(java.lang.String nature)
Sets the nature to check for.

Parameters:
nature - the nature to set.

isNatureSet

public boolean isNatureSet()
Returns true if the nature has been set.

Returns:
true if the nature has been set.

requireNatureSet

public final void requireNatureSet()
Makes sure the nature attribute has been set. Otherwise throws a BuildException


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.