Package net.ggtools.grand.ant
Class AntTaskLink
- java.lang.Object
-
- net.ggtools.grand.graph.LinkImpl
-
- net.ggtools.grand.ant.AntLink
-
- net.ggtools.grand.ant.AntTaskLink
-
- All Implemented Interfaces:
GraphObject
,Link
- Direct Known Subclasses:
SubantTaskLink
public class AntTaskLink extends AntLink
A link representing a call by a task such likeant
,runtarget
, etc. Instances of the class will have a mandatory task name and may have some defined parameters.- Author:
- Christophe Labouisse
-
-
Field Summary
-
Fields inherited from interface net.ggtools.grand.graph.GraphObject
ATTR_ALL, ATTR_NONE
-
Fields inherited from interface net.ggtools.grand.graph.Link
ATTR_CONDITIONAL_LINK, ATTR_WEAK_LINK
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(LinkVisitor visitor)
Method accept.void
addPropertyFile(String fileName)
Add a new property file to the current list.void
clearAttributes(int attributeMask)
Method clearAttributes.int
getAttributes()
Method getAttributes.String
getParameter(String key)
Return the value of a parameter ornull
if not defined.Map<String,String>
getParameterMap()
Returns a readonly version of the parameter map.String[]
getPropertyFiles()
Returns an array of property files set for this link.String
getTaskName()
boolean
hasAttributes(int attributeMask)
Method hasAttributes.void
setAttributes(int attributeMask)
Method setAttributes.void
setParameter(String key, String value)
Sets an attribute for the link.-
Methods inherited from class net.ggtools.grand.graph.LinkImpl
getEndNode, getGraph, getName, getStartNode, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.ggtools.grand.graph.GraphObject
clearAttributes, getAttributes, hasAttributes, setAttributes
-
-
-
-
Method Detail
-
accept
public void accept(LinkVisitor visitor)
Method accept.- Specified by:
accept
in interfaceLink
- Overrides:
accept
in classAntLink
- Parameters:
visitor
- LinkVisitor- See Also:
Link.accept(net.ggtools.grand.graph.visit.LinkVisitor)
-
getTaskName
public final String getTaskName()
- Returns:
- Returns the taskName.
-
setParameter
public final void setParameter(String key, String value)
Sets an attribute for the link.- Parameters:
key
- Stringvalue
- String
-
getParameter
public final String getParameter(String key)
Return the value of a parameter ornull
if not defined.- Parameters:
key
- String- Returns:
- String
-
getPropertyFiles
public final String[] getPropertyFiles()
Returns an array of property files set for this link.- Returns:
- String[]
-
addPropertyFile
public final void addPropertyFile(String fileName)
Add a new property file to the current list.- Parameters:
fileName
- String
-
getParameterMap
public final Map<String,String> getParameterMap()
Returns a readonly version of the parameter map.- Returns:
- a read only map of the parameters.
-
setAttributes
public void setAttributes(int attributeMask)
Method setAttributes.- Specified by:
setAttributes
in interfaceGraphObject
- Parameters:
attributeMask
- int- See Also:
GraphObject.setAttributes(int)
-
getAttributes
public int getAttributes()
Method getAttributes.- Specified by:
getAttributes
in interfaceGraphObject
- Returns:
- int
- See Also:
GraphObject.getAttributes()
-
clearAttributes
public void clearAttributes(int attributeMask)
Method clearAttributes.- Specified by:
clearAttributes
in interfaceGraphObject
- Parameters:
attributeMask
- int- See Also:
GraphObject.clearAttributes(int)
-
hasAttributes
public boolean hasAttributes(int attributeMask)
Method hasAttributes.- Specified by:
hasAttributes
in interfaceGraphObject
- Parameters:
attributeMask
- int- Returns:
- boolean
- See Also:
GraphObject.hasAttributes(int)
-
-