Top Description Fields Constructors Methods
org.apache.tools.ant.types.spi

public Class Service

extends ProjectComponent
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, java.nio.charset.StandardCharsets, java.util.ArrayList, .List, java.util.stream.Collectors, org.apache.tools.ant.BuildException, .ProjectComponent

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

Field Summary

Modifier and TypeField and Description
private List<Provider>
private String
Inherited from org.apache.tools.ant.ProjectComponent:
descriptionlocationproject

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addConfiguredProvider(Provider
a provider element.
provider
)

Add a nested provider element.

public void
check()

Check if this object is configured correctly as a nested element.

public InputStream

Returns:

an inputstream of the classname names encoded as UTF-8.
getAsStream
()

Return the implementations of this services as an inputstream.

public String

Returns:

the service type.
getType
()

public void
setProvider(String
the classname of a provider of this service.
className
)

Set the provider classname.

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

Set the service type.

Inherited from org.apache.tools.ant.ProjectComponent:
clonegetDescriptiongetLocationgetProjectloglogsetDescriptionsetLocationsetProject

Field Detail

providerListback to summary
private List<Provider> providerList
typeback to summary
private String type

Constructor Detail

Serviceback to summary
public Service()

Method Detail

addConfiguredProviderback to summary
public void addConfiguredProvider(Provider provider)

Add a nested provider element.

Parameters
provider:Provider

a provider element.

checkback to summary
public void check()

Check if this object is configured correctly as a nested element.

getAsStreamback to summary
public InputStream getAsStream() throws IOException

Return the implementations of this services as an inputstream.

Returns:InputStream

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

Exceptions
IOException:
if there is an error.
getTypeback to summary
public String getType()
Returns:String

the service type.

setProviderback to summary
public void setProvider(String className)

Set the provider classname.

Parameters
className:String

the classname of a provider of this service.

setTypeback to summary
public void setType(String type)

Set the service type.

Parameters
type:String

the service type, a classname of an interface or a class (normally abstract).