com.oy.shared.lw.misc
Class CmdOptions
java.lang.Object
com.oy.shared.lw.misc.CmdOptions
- public class CmdOptions
- extends java.lang.Object
|
Method Summary |
static void |
applyPropertiesToObjectFields(ITrace trace,
java.lang.String namespace,
java.util.Properties props,
java.lang.Object object)
This method will set object fields from the properties;
for the property myclass.name=boo the "myclass" is the namespace, the "name"
is the field name that will be set on Object via reflection |
static java.util.Properties |
parseFromMainArgs(java.lang.String[] args)
This method converts String [] args in main() method into the list of properties. |
static void |
waitForUserToAbort(java.lang.String msg,
java.lang.String password)
This method waits for user input on the console, if user types password
this method exist, if not the msg is printed out and the thing continues. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CmdOptions
public CmdOptions()
parseFromMainArgs
public static java.util.Properties parseFromMainArgs(java.lang.String[] args)
- This method converts String [] args in main() method into the list of properties.
The args must be in the form of A=123 B=567 C="fdfsdf f sdf";
the names will be capitalized
applyPropertiesToObjectFields
public static void applyPropertiesToObjectFields(ITrace trace,
java.lang.String namespace,
java.util.Properties props,
java.lang.Object object)
- This method will set object fields from the properties;
for the property myclass.name=boo the "myclass" is the namespace, the "name"
is the field name that will be set on Object via reflection
waitForUserToAbort
public static void waitForUserToAbort(java.lang.String msg,
java.lang.String password)
throws java.io.IOException
- This method waits for user input on the console, if user types password
this method exist, if not the msg is printed out and the thing continues.
- Throws:
java.io.IOException
Copyright (C) 2005-2006 Pavel Simakov
http://www.softwaresecretweapons.com