Google

JanosVM v0.6.0 Java API Documentation: Class ConfigFile
JanosVM v0.6.0 Java API

edu.utah.janosvm.sys
Class ConfigFile

java.lang.Object
  |
  +--edu.utah.janosvm.sys.ConfigFile

public class ConfigFile
extends java.lang.Object

Provides basic access to the configuration file. A configuration file is a set of string pairs. Pairs are grouped in 'sections'. The first string in a pair is the 'tag', the second string is the 'value'. Pairs are looked up by tag. Multiple pairs may have the same tag, these pairs are ordered into N 'instances', one for each pair.

XXX This is a quick hack and should be replaced with something more appropriate.

Author:
Tim Stack, Utah Janos Team

Constructor Summary
ConfigFile()
           
 
Method Summary
static java.lang.String lookup(java.lang.String section, java.lang.String tag)
          Lookup the first instance of a pair in the config file.
static java.lang.String lookup(java.lang.String section, java.lang.String tag, int instance)
          Lookup a pair defined in the config file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigFile

public ConfigFile()
Method Detail

lookup

public static java.lang.String lookup(java.lang.String section,
                                      java.lang.String tag,
                                      int instance)
Lookup a pair defined in the config file.
Parameters:
section - The pairs section to look up the tag.
tag - The identifier to lookup in the pairs section.
instance - The instance of the tag to select.
Returns:
The value of the tag

lookup

public static java.lang.String lookup(java.lang.String section,
                                      java.lang.String tag)
Lookup the first instance of a pair in the config file.
Parameters:
section - The pairs section to look up the tag.
tag - The identifier to lookup in the pairs section.
Returns:
The value of the tag

JanosVM v0.6.0 Java API

This documentation is Copyright (C) 2000-2002 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions.
Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/
Generated on Mar 17, 2002