org.apache.tools.ant.types.spi

Class Service

public class Service extends ProjectComponent

ANT Jar-Task SPI extension

See Also: http://issues.apache.org/bugzilla/show_bug.cgi?id=31520

Method Summary
voidaddConfiguredProvider(Provider provider)
Add a nested provider element.
voidcheck()
Check if this object is configured correctly as a nested element.
InputStreamgetAsStream()
Return the implementations of this services as an inputstream.
StringgetType()
voidsetProvider(String className)
Set the provider classname.
voidsetType(String type)
Set the service type.

Method Detail

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()
Return the implementations of this services as an inputstream.

Returns: an inputstream of the classname names encoded as UTF-8.

Throws: IOException if there is an error.

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).