antsnest.antinfo
Class DefaultAntInfo

java.lang.Object
  extended by antsnest.antinfo.DefaultAntInfo
All Implemented Interfaces:
AntInfo

public class DefaultAntInfo
extends Object
implements AntInfo

Implementation of AntInfo

Author:
Chris Clohosy
See Also:
AntInfo

Constructor Summary
DefaultAntInfo()
          Constructs an information object
 
Method Summary
 void addTask(TaskDefinition task)
          Adds knowledge of a new task
 void addType(TypeDefinition type)
          Adds knowledge of a new type
 boolean doesTaskExist(String task)
          Whether a task exists
 boolean doesTypeExist(String type)
          Whether a type exists
 String[] getCategoryNames()
          Gets all the category names
 TaskDefinition getTask(String name)
          Gets a task by name
 TaskDefinition[] getTasks()
          Gets all the tasks known about
 TaskDefinition[] getTasks(String categoryName)
          Gets all the tasks belonging to a particular category
 TypeDefinition getType(String typeName)
          Gets a type if it knows about it
 TypeDefinition[] getTypes()
          Gets all the types known about
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAntInfo

public DefaultAntInfo()
Constructs an information object

Method Detail

addTask

public void addTask(TaskDefinition task)
Adds knowledge of a new task

Specified by:
addTask in interface AntInfo
Parameters:
task - the task to add

addType

public void addType(TypeDefinition type)
Adds knowledge of a new type

Specified by:
addType in interface AntInfo
Parameters:
type - the type to add

getType

public TypeDefinition getType(String typeName)
Gets a type if it knows about it

Specified by:
getType in interface AntInfo
Parameters:
typeName - the name of the type required
Returns:
a TypeDefinition, the type that was required

doesTaskExist

public boolean doesTaskExist(String task)
Whether a task exists

Specified by:
doesTaskExist in interface AntInfo
Parameters:
task - the task to check for
Returns:
a boolean, whether it exists

doesTypeExist

public boolean doesTypeExist(String type)
Whether a type exists

Specified by:
doesTypeExist in interface AntInfo
Parameters:
type - the type to check for
Returns:
a boolean, whether it exists

getCategoryNames

public String[] getCategoryNames()
Gets all the category names

Specified by:
getCategoryNames in interface AntInfo
Returns:
a String[], the names

getTasks

public TaskDefinition[] getTasks(String categoryName)
Gets all the tasks belonging to a particular category

Specified by:
getTasks in interface AntInfo
Parameters:
categoryName - the category name to search with
Returns:
a TaskDefinition[], the tasks

getTask

public TaskDefinition getTask(String name)
Gets a task by name

Specified by:
getTask in interface AntInfo
Parameters:
name - the name of the task required
Returns:
a TaskDefinition, the task

getTasks

public TaskDefinition[] getTasks()
Gets all the tasks known about

Specified by:
getTasks in interface AntInfo
Returns:
a TaskDefinition[], the tasks

getTypes

public TypeDefinition[] getTypes()
Gets all the types known about

Specified by:
getTypes in interface AntInfo
Returns:
a TypeDefinition[], the types