Interface PropertyProvider

All Known Implementing Classes:
PropertyProviderDefault

public interface PropertyProvider
A property provider is used to access an application's arguments at runtime. It synchronizes command line arguments with Java runtime properties and provides a unified way to access, configure and parse properties. The following example code shows how to use a property provider to handle command line arguments:
 private static final Property[] localProps = {
       new PropertyCfg<String>("de.mid.myArg", "this is the description for de.mid.myArg"),
       new PropertyCfg<Boolean>("de.mid.myFlag", false, "this is the description for de.mid.myFlag")
       }

 static public main(String[] argv) {
       PropertyProvider propProv = new PropertyProviderDefault();
       List<Property> tmp = Arrays.asList(localProps);
       propProv.providePropertyList(tmp);
       // further initialization
        ...

       // provide and parse command line arguments
       propProv.InitWithCommandLineArguments(argv);
 }
Author:
borschet
See Also: