|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dtfj.analyzer.util.RuntimeParameters
public class RuntimeParameters
A convenience class to simplify the handling of runtime parameters passed to the DumpAnalyzer. These parameters will either be the names of analysis modules or controls which govern the presentation of results. The latter will in general be preceded by the '-' char
Constructor Summary | |
---|---|
RuntimeParameters(java.lang.String parameters)
Build a parameter set from a set of strings. |
|
RuntimeParameters(java.lang.String[] args,
int start)
Build a parameter set from a set of strings and starting from the given index where 0 is the first string. |
Method Summary | |
---|---|
void |
addParameter(java.lang.String parm)
Add a parameter to the current set. |
void |
clear()
Remove all parameters |
int |
countAnalyzers()
How many analyzers are defined in the parameters ? |
int |
countParameters()
How many parameters are there - not including analyzers |
java.lang.String |
getAnalyzer(int indx)
Return the name of the analyzer at position indx |
java.lang.String[] |
getAnalyzers()
Get the names of all analyzers |
int |
getIntValue(int indx)
Get the int value of the parameter at position indx Values are specified as parameterName=value |
int |
getIntValue(java.lang.String name,
int defaultValue)
Get the int value of the parameter at position indx Values are specified as parameterName=value If the parameter is undefined or has no value then return the given default |
java.lang.String |
getParameter(int indx)
Get the parameter at the given position index |
int |
getParameterIndex(java.lang.String name)
Get the index of the given named parameter or -1 if not found |
java.lang.String |
getValue(int indx)
Get the string value of the parameter at position indx Values are specified as parameterName=value |
java.lang.String |
getValue(java.lang.String name,
java.lang.String defaultValue)
Get the string value of the parameter at position indx Values are specified as parameterName=value If the parameter is undefined or has no value then return the given default |
boolean |
parameterExists(java.lang.String name)
Does the given paremeter name exist in the set |
static java.lang.String[] |
splitParams(java.lang.String params)
Split a string containing parameters into an array of parameters. |
java.lang.String |
toString()
Return a string representation of the parameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RuntimeParameters(java.lang.String[] args, int start)
args
- vector of string parametersstart
- the first parameter to considerpublic RuntimeParameters(java.lang.String parameters)
parameters
- vector of string parametersMethod Detail |
---|
public void addParameter(java.lang.String parm)
parm
- the parameter to addpublic void clear()
public int countAnalyzers()
public java.lang.String getAnalyzer(int indx)
indx
- the analyzer to return
public java.lang.String[] getAnalyzers()
public int countParameters()
public java.lang.String getParameter(int indx)
indx
- the parameter index to return
public int getParameterIndex(java.lang.String name)
name
- the name of the parameter to find
public boolean parameterExists(java.lang.String name)
name
- the name to search for
public java.lang.String getValue(int indx)
indx
- the parameter index
public java.lang.String getValue(java.lang.String name, java.lang.String defaultValue)
name
- the parameter namedefaultValue
- the default value if missing
public int getIntValue(int indx)
indx
- the parameter index
public int getIntValue(java.lang.String name, int defaultValue)
name
- the parameter namedefaultValue
- the default value if missing
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public static java.lang.String[] splitParams(java.lang.String params)
params
- a String
containing parameters
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |