Class Service

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.spi.Service
All Implemented Interfaces:
Cloneable

public class Service extends ProjectComponent
ANT Jar-Task SPI extension
See Also:
  • Constructor Details

    • Service

      public Service()
  • Method Details

    • setProvider

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

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

      public String getType()
      Returns:
      the service type.
    • 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).
    • 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.
      Throws:
      IOException - if there is an error.
    • check

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