edu.vt.marian.server
Class class_dir_table

java.lang.Object
  |
  +--edu.vt.marian.server.class_dir_table

public class class_dir_table
extends java.lang.Object

class name: class_dir_table class description: this class represents a table of class names and their corresponding directory names, this class is used by configuration object to manage system class directories. uses the services of class(es): class_dir designer(s): Jianxin Zhao (jxzhao@csgrad.cs.vt.edu) implementator(s): Ning Chai (nchai@csgrad.cs.vt.edu) finished time: Nov 23, 1998 known bugs: JDK version: 1.1.5 side effects:


Field Summary
static int CLASS_ALREADY_EXISTS
           
static int CLASS_DOESNT_EXIST
           
static int NULL_CLASS_NAME
           
static int NULL_DIR_NAME
           
static int NULL_DIR_NAME_NEG
           
static int OK
           
 
Constructor Summary
class_dir_table(edu.vt.marian.common.Debug debug)
          method description: this constructor will create a class dir table object, the table is empty upon creation uses the services of class(es): input parameter(s): debug -- used for debugging output parameter(s): none return value: none synchronization:none
 
Method Summary
 int add(java.lang.String class_name, java.lang.String dir_name)
          method description: this method will add the specified class name and directory name pair to the table uses the services of class(es): none input parameter(s): class_name -- this is the name of a class, class name must be uniq in the table (currently we don't allow one class has more than one directories) dir_name -- this is the directory name corresponds to the class name output parameter(s): none return value: 0 -- the class name and directory name pair has been added into the table correctly 1 -- the class name is null 2 -- the directory name is null 3 -- duplicated class name identified synchronization:synchronized
 int delete_by_class(java.lang.String class_name)
          method description: this method will delete the entry in the table with the specified class name uses the services of class(es): input parameter(s): class_name -- the entry with the same class name will be deleted from teh table output parameter(s): none return value: 0 -- the entry has been deleted correctly 1 -- class name is null 4 -- there is no entry in the table with the specified class name synchronization:synchronized
 int delete_by_dir(java.lang.String dir_name)
          method description: this method will delete those entries in the table whose directory name is the same as the specified value or is a subdirectory of the specified directory name uses the services of class(es): input parameter(s): dir_name -- this will be used to search the table output parameter(s): none return value: non negative integer -- the number of entries deleted -1 -- the directory name is null synchronization:synchronized
 java.util.Vector get_class_names(java.lang.String dir_name)
          method description: this method will return the class name(s) whose corresponding directory name is the same as the specified value in the table uses the services of class(es): input parameter(s): dir_name -- this will be used to search the table output parameter(s): none return value: null -- the directory name is null a vector -- contains all the class names match the directory name in the table synchronization:none
 java.lang.String get_dir_name(java.lang.String class_name)
          method description: this method will return the directory name corresponds to the specified class name in the table uses the services of class(es): none input parameter(s): class_name -- this will be used to search the table output parameter(s): none return value: null -- class name is null or didn't find an entry in the table with the same class name synchronization:synchronized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK

public static final int OK

NULL_DIR_NAME_NEG

public static final int NULL_DIR_NAME_NEG

NULL_CLASS_NAME

public static final int NULL_CLASS_NAME

NULL_DIR_NAME

public static final int NULL_DIR_NAME

CLASS_ALREADY_EXISTS

public static final int CLASS_ALREADY_EXISTS

CLASS_DOESNT_EXIST

public static final int CLASS_DOESNT_EXIST
Constructor Detail

class_dir_table

public class_dir_table(edu.vt.marian.common.Debug debug)
method description: this constructor will create a class dir table object, the table is empty upon creation uses the services of class(es): input parameter(s): debug -- used for debugging output parameter(s): none return value: none synchronization:none
Method Detail

add

public int add(java.lang.String class_name,
               java.lang.String dir_name)
method description: this method will add the specified class name and directory name pair to the table uses the services of class(es): none input parameter(s): class_name -- this is the name of a class, class name must be uniq in the table (currently we don't allow one class has more than one directories) dir_name -- this is the directory name corresponds to the class name output parameter(s): none return value: 0 -- the class name and directory name pair has been added into the table correctly 1 -- the class name is null 2 -- the directory name is null 3 -- duplicated class name identified synchronization:synchronized

get_dir_name

public java.lang.String get_dir_name(java.lang.String class_name)
method description: this method will return the directory name corresponds to the specified class name in the table uses the services of class(es): none input parameter(s): class_name -- this will be used to search the table output parameter(s): none return value: null -- class name is null or didn't find an entry in the table with the same class name synchronization:synchronized

delete_by_class

public int delete_by_class(java.lang.String class_name)
method description: this method will delete the entry in the table with the specified class name uses the services of class(es): input parameter(s): class_name -- the entry with the same class name will be deleted from teh table output parameter(s): none return value: 0 -- the entry has been deleted correctly 1 -- class name is null 4 -- there is no entry in the table with the specified class name synchronization:synchronized

delete_by_dir

public int delete_by_dir(java.lang.String dir_name)
method description: this method will delete those entries in the table whose directory name is the same as the specified value or is a subdirectory of the specified directory name uses the services of class(es): input parameter(s): dir_name -- this will be used to search the table output parameter(s): none return value: non negative integer -- the number of entries deleted -1 -- the directory name is null synchronization:synchronized

get_class_names

public java.util.Vector get_class_names(java.lang.String dir_name)
method description: this method will return the class name(s) whose corresponding directory name is the same as the specified value in the table uses the services of class(es): input parameter(s): dir_name -- this will be used to search the table output parameter(s): none return value: null -- the directory name is null a vector -- contains all the class names match the directory name in the table synchronization:none