Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JanosVM v0.5.1 Java API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JanosVM v0.5.1 Java API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

This documentation is Copyright (C) 2000-2001 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 Jun 1, 2001