Top Description Fields Constructors Methods
org.apache.tools.ant.input

public Class PropertyFileInputHandler

extends Object
implements InputHandler
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.input.InputHandler
Imports
java.io.IOException, java.nio.file.Files, .Paths, java.util.Properties, org.apache.tools.ant.BuildException

Reads input from a property file, the file name is read from the system property ant.input.properties, the prompt is the key for input.
Since
Ant 1.5

Field Summary

Modifier and TypeField and Description
public static final String
FILE_NAME_KEY

Name of the system property we expect to hold the file name.

private Properties

Constructor Summary

AccessConstructor and Description
public
PropertyFileInputHandler()

Empty no-arg constructor.

Method Summary

Modifier and TypeMethod and Description
public void
handleInput(InputRequest
an input request.
request
)

Implements org.apache.tools.ant.input.InputHandler.handleInput.

Picks up the input from a property, using the prompt as the name of the property.
private synchronized void
readProps()

Reads the properties file if it hasn't already been read.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FILE_NAME_KEYback to summary
public static final String FILE_NAME_KEY

Name of the system property we expect to hold the file name.

propsback to summary
private Properties props

Constructor Detail

PropertyFileInputHandlerback to summary
public PropertyFileInputHandler()

Empty no-arg constructor.

Method Detail

handleInputback to summary
public void handleInput(InputRequest request) throws BuildException

Implements org.apache.tools.ant.input.InputHandler.handleInput.

Picks up the input from a property, using the prompt as the name of the property.

Parameters
request:InputRequest

an input request.

Exceptions
BuildException:
if no property of that name can be found.
readPropsback to summary
private synchronized void readProps() throws BuildException

Reads the properties file if it hasn't already been read.