org.apache.tools.ant.types.spi

Class Service

Implemented Interfaces:
Cloneable

public class Service
extends ProjectComponent

ANT Jar-Task SPI extension
See Also:
http://issues.apache.org/bugzilla/show_bug.cgi?id=31520

Field Summary

Fields inherited from class org.apache.tools.ant.ProjectComponent

description, location, project

Method Summary

void
addConfiguredProvider(Provider provider)
Add a nested provider element.
void
check()
Check if this object is configured correctly as a nested element.
InputStream
getAsStream()
Return the implementations of this services as an inputstream.
String
getType()
void
setProvider(String className)
Set the provider classname.
void
setType(String type)
Set the service type.

Methods inherited from class org.apache.tools.ant.ProjectComponent

clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject

Method Details

addConfiguredProvider

public void addConfiguredProvider(Provider provider)
Add a nested provider element.
Parameters:
provider - a provider element.

check

public void check()
Check if this object is configured correctly as a nested element.

getAsStream

public InputStream getAsStream()
            throws IOException
Return the implementations of this services as an inputstream.
Returns:
an inputstream of the classname names encoded as UTF-8.

getType

public String getType()
Returns:
the service type.

setProvider

public void setProvider(String className)
Set the provider classname.
Parameters:
className - the classname of a provider of this service.

setType

public void setType(String type)
Set the service type.
Parameters:
type - the service type, a classname of an interface or a class (normally abstract).