com.beust.jcommander.defaultprovider
Class PropertyFileDefaultProvider

java.lang.Object
  extended by com.beust.jcommander.defaultprovider.PropertyFileDefaultProvider
All Implemented Interfaces:
IDefaultProvider

public class PropertyFileDefaultProvider
extends Object
implements IDefaultProvider

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

Author:
cbeust

Field Summary
static String DEFAULT_FILE_NAME
           
 
Constructor Summary
PropertyFileDefaultProvider()
           
PropertyFileDefaultProvider(String fileName)
           
 
Method Summary
 String getDefaultValueFor(String optionName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FILE_NAME

public static final String DEFAULT_FILE_NAME
See Also:
Constant Field Values
Constructor Detail

PropertyFileDefaultProvider

public PropertyFileDefaultProvider()

PropertyFileDefaultProvider

public PropertyFileDefaultProvider(String fileName)
Method Detail

getDefaultValueFor

public String getDefaultValueFor(String optionName)
Specified by:
getDefaultValueFor in interface IDefaultProvider
Parameters:
optionName - The name of the option as specified in the names() attribute of the @Parameter option (e.g. "-file").
Returns:
the default value for this option.


Copyright © 2012. All Rights Reserved.