|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.util.Parameters
public abstract class Parameters
The Parameters class contains methods that allow information from application command-line arguments and from Applet parameters to be used in a uniform way. The class cannot be instantiated.
ParameterException
Nested Class Summary | |
---|---|
(package private) static class |
Parameters.AccessRecordingProperties
|
Constructor Summary | |
---|---|
Parameters()
|
Method Summary | |
---|---|
static boolean |
allParametersWereUsed()
|
static void |
checkParameterUse()
|
static boolean |
getBoolean(java.lang.String pname)
|
static boolean |
getBoolean(java.lang.String pname,
boolean defaultValue)
|
static java.lang.Class |
getClass(java.lang.String pname)
|
static java.lang.Class |
getClass(java.lang.String pname,
java.lang.Class defaultValue)
|
static java.awt.Dimension |
getDimension(java.lang.String pname)
|
static int |
getInt(java.lang.String pname)
|
static int |
getInt(java.lang.String pname,
int defaultValue)
|
static int |
getInt(java.lang.String pname,
int radix,
int defaultValue)
|
static java.util.List |
getList(java.lang.String pname)
|
static java.util.List |
getList(java.lang.String pname,
java.util.List defaultValue)
|
static java.lang.String |
getParameter(java.lang.String pname)
Returns the value of the parameter if one was specified, else returns null. |
static java.lang.String |
getParameter(java.lang.String pname,
java.lang.String defaultValue)
|
static java.util.Properties |
getParameters()
|
static boolean |
haveParameter(java.lang.String pname)
|
static boolean |
isApplet()
|
static boolean |
isInteractive()
|
static void |
loadParameters(java.lang.String resourceName)
|
static void |
processCommandLineArguments(java.lang.String[] argv)
Parse a String[] of command-line arguments. |
static java.lang.String |
requireParameter(java.lang.String pname)
|
static void |
setApplet(java.applet.Applet a)
|
static void |
setIsInteractive(boolean v)
|
static void |
setParameter(java.lang.String pname,
java.lang.String value)
Sets a parameter value. |
static boolean |
usedParameter(java.lang.String pname)
Returns true if the haveParameter method or any of the parameter "get" methods has been called on the indicated parameter name; else returns false. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Parameters()
Method Detail |
---|
public static void setParameter(java.lang.String pname, java.lang.String value)
Debug.processParameter(String, String)
,
in case the paraemter affects debugging output.
The setParameter method doesn't produce any debugging
output of its own until after that call.
public static java.util.Properties getParameters()
public static boolean isInteractive()
public static void setIsInteractive(boolean v)
public static java.lang.String getParameter(java.lang.String pname)
public static java.lang.String getParameter(java.lang.String pname, java.lang.String defaultValue)
public static boolean haveParameter(java.lang.String pname)
public static java.lang.String requireParameter(java.lang.String pname)
public static boolean usedParameter(java.lang.String pname)
public static int getInt(java.lang.String pname)
public static int getInt(java.lang.String pname, int defaultValue)
public static int getInt(java.lang.String pname, int radix, int defaultValue)
public static boolean getBoolean(java.lang.String pname)
public static boolean getBoolean(java.lang.String pname, boolean defaultValue)
public static java.awt.Dimension getDimension(java.lang.String pname)
public static java.util.List getList(java.lang.String pname)
public static java.util.List getList(java.lang.String pname, java.util.List defaultValue)
public static java.lang.Class getClass(java.lang.String pname)
public static java.lang.Class getClass(java.lang.String pname, java.lang.Class defaultValue)
public static void checkParameterUse()
public static boolean allParametersWereUsed()
public static void processCommandLineArguments(java.lang.String[] argv)
If no value is given, the value is the empty string "". For getBoolean(name), this is equivalent to "true".
The syntax -not name, or -no name, is equivalent to -name=false.
The syntax -load resource-name can be used to read parameter values from a file, from a URL, or from a resource looked up by a class- loader. The contents should be lines in name=value syntax.
public static void loadParameters(java.lang.String resourceName)
public static boolean isApplet()
public static void setApplet(java.applet.Applet a)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |