Class Service
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.spi.Service
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields inherited from class ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConfiguredProvider(Provider provider) Add a nested provider element.voidcheck()Check if this object is configured correctly as a nested element.Return the implementations of this services as an inputstream.getType()voidsetProvider(String className) Set the provider classname.voidSet the service type.Methods inherited from class ProjectComponent
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectModifier and TypeMethodDescriptionclone()Returns the description of the current action.Returns the file/location where this task was defined.Returns the project to which this component belongs.voidLogs a message with the default (INFO) priority.voidLogs a message with the given priority.voidsetDescription(String desc) Sets a description of the current action.voidsetLocation(Location location) Sets the file/location where this task was defined.voidsetProject(Project project) Sets the project object of this component.
-
Constructor Details
-
Service
public Service()
-
-
Method Details
-
setProvider
Set the provider classname.- Parameters:
className- the classname of a provider of this service.
-
addConfiguredProvider
Add a nested provider element.- Parameters:
provider- a provider element.
-
getType
- Returns:
- the service type.
-
setType
Set the service type.- Parameters:
type- the service type, a classname of an interface or a class (normally abstract).
-
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.
-
check
public void check()Check if this object is configured correctly as a nested element.
-