cryptix.asn1.lang
Class PackageProperties

java.lang.Object
  |
  +--cryptix.asn1.lang.PackageProperties

public class PackageProperties
extends java.lang.Object

This class acts as a central repository for a package specific properties. It reads an (package).properties file containing package-specific properties.

Copyright ©1997, 1998, 1999 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.1 $

Author:
David Hopwood, Jill Baker, Raif S. Naffah

Field Summary
(package private) static boolean GLOBAL_DEBUG
           
 
Constructor Summary
PackageProperties()
           
 
Method Summary
(package private) static int getLevel(java.lang.String label)
          Returns the debug level for a given class.
(package private) static java.io.PrintWriter getOutput()
          Returns the PrintWriter to which tracing and debugging output is to be sent.
static java.lang.String getProperty(java.lang.String key)
          Returns the value of a property for this algorithm.
static java.lang.String getProperty(java.lang.String key, java.lang.String value)
          Returns the value of a property for this algorithm, or return value if the property was not set.
(package private) static boolean isTraceable(java.lang.String label)
          Returns true if tracing is requested for a given class.
static void list(java.io.PrintStream out)
          Lists algorithm properties to the PrintStream out.
static void list(java.io.PrintWriter out)
          Lists algorithm properties to the PrintWriter out.
static java.util.Enumeration propertyNames()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLOBAL_DEBUG

static final boolean GLOBAL_DEBUG
See Also:
Constant Field Values
Constructor Detail

PackageProperties

public PackageProperties()
Method Detail

getProperty

public static java.lang.String getProperty(java.lang.String key)
Returns the value of a property for this algorithm.


getProperty

public static java.lang.String getProperty(java.lang.String key,
                                           java.lang.String value)
Returns the value of a property for this algorithm, or return value if the property was not set.


list

public static void list(java.io.PrintStream out)
Lists algorithm properties to the PrintStream out.


list

public static void list(java.io.PrintWriter out)
Lists algorithm properties to the PrintWriter out.


propertyNames

public static java.util.Enumeration propertyNames()

isTraceable

static boolean isTraceable(java.lang.String label)
Returns true if tracing is requested for a given class.

User indicates this by setting the tracing boolean property for label in the (algorithm).properties file. The property's key is "Trace.label".

Parameters:
label - The name of a class.
Returns:
True iff a boolean true value is set for a property with the key Trace.label.

getLevel

static int getLevel(java.lang.String label)
Returns the debug level for a given class.

User indicates this by setting the numeric property with key "Debug.Level.label".

If this property is not set, "Debug.Level.*" is looked up next. If neither property is set, or if the first property found is not a valid decimal integer, then this method returns 0.

Parameters:
label - The name of a class.
Returns:
The required debugging level for the designated class.

getOutput

static java.io.PrintWriter getOutput()
Returns the PrintWriter to which tracing and debugging output is to be sent.

User indicates this by setting the property with key Output to the literal out or err.

By default or if the set value is not allowed, System.err will be used.