JML

org.multijava.util.optgen
Class DefinitionFile

java.lang.Object
  extended byorg.multijava.util.optgen.DefinitionFile
All Implemented Interfaces:
SelectionVariables

class DefinitionFile
extends Object
implements SelectionVariables


Field Summary
private  OptionDefinition[] definitions
           
private  String implement
           
private  String packageName
           
private  String parent
           
private  String prefix
           
static String selectionName
          Denotes the structure name that the option is using to store the different selections for that option
static String selectionType
          Denotes the structure type that the option is using to store the different selections for that option
private  String sourceFile
           
static String structureName
          Denotes the structure name that the option is using to store the data structrues that store the different selections for that option
private  String url
           
private  String usage
           
private  String version
           
 
Constructor Summary
DefinitionFile(String sourceFile, String packageName, String parent, String implement, String prefix, String version, String usage, String url, ArrayList definitions)
          Constructs a definition file
 
Method Summary
 void checkIdentifiers(Hashtable identifiers)
          Check for duplicate identifiers
 void checkShortcuts(Hashtable identifiers)
          Check for duplicate identifiers
 String getClassName()
          Returns the package name
 String getPackageName()
          Returns the package name
 String getPrefix()
          Returns the literal prefix
 void printFile(PrintWriter out)
          Prints the token definition to interface file (java)
static DefinitionFile read(String sourceFile)
          Reads and parses an token definition file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceFile

private final String sourceFile

packageName

private final String packageName

parent

private final String parent

implement

private final String implement

prefix

private final String prefix

version

private final String version

usage

private final String usage

url

private final String url

definitions

private final OptionDefinition[] definitions

structureName

public static final String structureName
Denotes the structure name that the option is using to store the data structrues that store the different selections for that option


selectionType

public static final String selectionType
Denotes the structure type that the option is using to store the different selections for that option


selectionName

public static final String selectionName
Denotes the structure name that the option is using to store the different selections for that option

Constructor Detail

DefinitionFile

public DefinitionFile(String sourceFile,
                      String packageName,
                      String parent,
                      String implement,
                      String prefix,
                      String version,
                      String usage,
                      String url,
                      ArrayList definitions)
Constructs a definition file

Method Detail

read

public static DefinitionFile read(String sourceFile)
                           throws OptgenError
Reads and parses an token definition file

Parameters:
sourceFile - the name of the source file
Returns:
a class info structure holding the information from the source
Throws:
OptgenError

checkIdentifiers

public void checkIdentifiers(Hashtable identifiers)
                      throws OptgenError
Check for duplicate identifiers

Parameters:
identifiers - a table of all token identifiers
Returns:
the id of the last token + 1
Throws:
OptgenError

checkShortcuts

public void checkShortcuts(Hashtable identifiers)
                    throws OptgenError
Check for duplicate identifiers

Parameters:
identifiers - a table of all token identifiers
Returns:
the id of the last token + 1
Throws:
OptgenError

printFile

public void printFile(PrintWriter out)
Prints the token definition to interface file (java)

Parameters:
out - the output stream

getClassName

public String getClassName()
Returns the package name


getPackageName

public String getPackageName()
Returns the package name


getPrefix

public String getPrefix()
Returns the literal prefix


JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.