mjc

org.multijava.util.classfile
Class ClassDirectory

java.lang.Object
  extended byorg.multijava.util.classfile.ClassDirectory
Direct Known Subclasses:
DirClassDirectory, ZipClassDirectory

abstract class ClassDirectory
extends Object

This class represents a conceptual directory which may hold files. Since Java can use archived class files found in a compressed ("zip") file, this entity may or may not correspond to an actual directory on disk.


Constructor Summary
(package private) ClassDirectory()
           
 
Method Summary
abstract  boolean containsDirectory(String name)
          returns true if the directory contains the given directory
abstract  ClassPath.ClassDescription findFile(String name, String suffix)
          Returns a file descriptor for the .java file that should store the type of the given name.
abstract  ClassPath.ClassDescription getClassFile(String name)
           
abstract  ClassPath.ClassDescription getClassFile(String name, String suffix)
           
abstract  String location()
          returns the root location of this directory element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassDirectory

ClassDirectory()
Method Detail

getClassFile

public abstract ClassPath.ClassDescription getClassFile(String name)
Parameters:
name - the name of the class
Returns:
a ClassDescription of a class file that contain the class named name

getClassFile

public abstract ClassPath.ClassDescription getClassFile(String name,
                                                        String suffix)

findFile

public abstract ClassPath.ClassDescription findFile(String name,
                                                    String suffix)
Returns a file descriptor for the .java file that should store the type of the given name.

 {|
    requires (* a .java file that should store the type named "name"
                exists on the sourcepath *);
    ensures (* \result is the file descriptor for that file *);
 also
    requires !(* a .java file that should store the type named "name"
                 exists on the sourcepath *);
    ensures \result == null;
 |}
 


containsDirectory

public abstract boolean containsDirectory(String name)
returns true if the directory contains the given directory


location

public abstract String location()
returns the root location of this directory element


mjc

mjc is Copyright (C) 2000-2004 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. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.