Top Description Fields Constructors Methods
com.beust.jcommander.defaultprovider

public Class PropertyFileDefaultProvider

extends Object
implements IDefaultProvider
Class Inheritance
All Implemented Interfaces
com.beust.jcommander.IDefaultProvider
Imports
com.beust.jcommander.IDefaultProvider, .ParameterException, java.io.IOException, java.net.URL, java.util.Properties

A default provider that reads its default values from a property file.
Author
cbeust

Field Summary

Modifier and TypeField and Description
public static final String
private Properties

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public String
getDefaultValueFor(String
The name of the option as specified in the names() attribute of the @Parameter option (e.g. "-file").
optionName
)

Implements com.beust.jcommander.IDefaultProvider.getDefaultValueFor.

private void
init(String fileName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_FILE_NAMEback to summary
public static final String DEFAULT_FILE_NAME
propertiesback to summary
private Properties properties

Constructor Detail

PropertyFileDefaultProviderback to summary
public PropertyFileDefaultProvider()
PropertyFileDefaultProviderback to summary
public PropertyFileDefaultProvider(String fileName)

Method Detail

getDefaultValueForback to summary
public String getDefaultValueFor(String optionName)

Implements com.beust.jcommander.IDefaultProvider.getDefaultValueFor.

Parameters
optionName:String

Doc from com.beust.jcommander.IDefaultProvider.getDefaultValueFor.

The name of the option as specified in the names() attribute of the @Parameter option (e.g. "-file").

Returns:String

Doc from com.beust.jcommander.IDefaultProvider.getDefaultValueFor.

the default value for this option.

initback to summary
private void init(String fileName)