com.ibm.dtfj.analyzer.ext
Interface IReportOptions


public interface IReportOptions


Field Summary
static java.lang.String DISABLED
          Constant to use for defining an option that is disabled
static java.lang.String ENABLED
          Constant to use for defining an option that is enabled
 
Method Summary
 boolean checkGlobalOption(java.lang.String optKey, boolean dflt)
          Determine if a given boolean option is currently enabled, checking the current options object and all other options object that have been pushed on the options stack for the calling thread.
 void declareOption(java.lang.String key, java.lang.String value, java.lang.String description)
          Declare an option in the current options object.
 java.lang.String getGlobalOption(java.lang.String optKey)
          Get the value associated with a given option, checking the current options object and all other options object that have been pushed on the options stack for the calling thread.
 void pop()
          Pop the top-most options object from the top of the options stack for the current thread.
 void push()
          Push the current options object on the options stack for the current thread.
 void setOption(java.lang.String optString)
          Add an option definition to the current options object.
 

Field Detail

ENABLED

static final java.lang.String ENABLED
Constant to use for defining an option that is enabled

See Also:
Constant Field Values

DISABLED

static final java.lang.String DISABLED
Constant to use for defining an option that is disabled

See Also:
Constant Field Values
Method Detail

getGlobalOption

java.lang.String getGlobalOption(java.lang.String optKey)
Get the value associated with a given option, checking the current options object and all other options object that have been pushed on the options stack for the calling thread.

Parameters:
optKey - a String that specifies the desired option
Returns:
the desired option's value, or null if not found

checkGlobalOption

boolean checkGlobalOption(java.lang.String optKey,
                          boolean dflt)
Determine if a given boolean option is currently enabled, checking the current options object and all other options object that have been pushed on the options stack for the calling thread.

Parameters:
optKey - a String that specifies the desired option
dflt - a default value to use if this option is neither explicitly enabled nor disabled
Returns:
true if this option is currently enabled, false otherwise (possibly from the default value)

setOption

void setOption(java.lang.String optString)
Add an option definition to the current options object. This setting will override any previous settings for the same option in the current options object or any other options objects on the options stack for the calling thread.

Parameters:
optString - the option definition, in form "key=value"

declareOption

void declareOption(java.lang.String key,
                   java.lang.String value,
                   java.lang.String description)
Declare an option in the current options object. The declared option indicates that a particular option key is valid and provides a default value if this option is not otherwise explicitly set anywhere.

Parameters:
key - a key representing the option being declared
value - a default value. This default value will be returned by @link #getGlobalOption(String) or @link #checkGlobalOption(String) if there was no explicit @link #setOption(String) for this option in this option object or any other option object on the options stack for the calling thread.
description - a description for the option being declared, suitable for use in "help" messages, etc.

push

void push()
Push the current options object on the options stack for the current thread. Each thread has a stack of options objects, which allow each method to augment or modify options that it received from its caller before itself calling some other method, etc.


pop

void pop()
Pop the top-most options object from the top of the options stack for the current thread.



© Copyright IBM Corp. 2007, 2008 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.