com.ibm.wala.classLoader
Class FileModule

java.lang.Object
  extended by com.ibm.wala.classLoader.FileModule
All Implemented Interfaces:
Module, ModuleEntry
Direct Known Subclasses:
ClassFileModule, SourceFileModule

public abstract class FileModule
extends java.lang.Object
implements Module, ModuleEntry

A module which is a wrapper around a file in the filesystem


Constructor Summary
FileModule(java.io.File f)
           
 
Method Summary
 Module asModule()
          Precondition: isModuleFile().
 boolean equals(java.lang.Object o)
           
 java.lang.String getAbsolutePath()
           
 java.util.Iterator<ModuleEntry> getEntries()
           
 java.io.File getFile()
           
 java.io.InputStream getInputStream()
           
 java.lang.String getName()
           
 int hashCode()
           
 boolean isModuleFile()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.wala.classLoader.ModuleEntry
getClassName, isClassFile, isSourceFile
 

Constructor Detail

FileModule

public FileModule(java.io.File f)
           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

getAbsolutePath

public java.lang.String getAbsolutePath()

getEntries

public java.util.Iterator<ModuleEntry> getEntries()
Specified by:
getEntries in interface Module
Returns:
an Iterator of the ModuleEntries in this Module.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getName

public java.lang.String getName()
Specified by:
getName in interface ModuleEntry
Returns:
a String that represents the name of the file described by this object

getInputStream

public java.io.InputStream getInputStream()
Specified by:
getInputStream in interface ModuleEntry

isModuleFile

public boolean isModuleFile()
Specified by:
isModuleFile in interface ModuleEntry
Returns:
true iff this module entry (file) represents a module in its own right. e.g., a jar file which is an entry in another jar file.

getFile

public java.io.File getFile()
Returns:
Returns the file.

asModule

public Module asModule()
                throws UnimplementedError
Description copied from interface: ModuleEntry
Precondition: isModuleFile().

Specified by:
asModule in interface ModuleEntry
Returns:
a Module view of this entry.
Throws:
UnimplementedError