Package com.ibm.wala.classLoader
Class FileModule
- java.lang.Object
-
- com.ibm.wala.classLoader.FileModule
-
- All Implemented Interfaces:
Module
,ModuleEntry
- Direct Known Subclasses:
ClassFileModule
,SourceFileModule
public abstract class FileModule extends Object implements Module, ModuleEntry
A module which is a wrapper around a file in the filesystem
-
-
Constructor Summary
Constructors Constructor Description FileModule(File f, Module container)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Module
asModule()
Precondition: isModuleFile().boolean
equals(Object o)
String
getAbsolutePath()
Module
getContainer()
the containing moduleIterator<ModuleEntry>
getEntries()
File
getFile()
InputStream
getInputStream()
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(File f, Module container) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
-
Method Detail
-
getAbsolutePath
public String getAbsolutePath()
-
getEntries
public Iterator<ModuleEntry> getEntries()
- Specified by:
getEntries
in interfaceModule
- Returns:
- an Iterator of the ModuleEntries in this Module.
-
getName
public String getName()
- Specified by:
getName
in interfaceModuleEntry
- Returns:
- a String that represents the name of the file described by this object
-
getInputStream
public InputStream getInputStream()
- Specified by:
getInputStream
in interfaceModuleEntry
- Returns:
- an InputStream which provides the contents of this logical file.
-
isModuleFile
public boolean isModuleFile()
- Specified by:
isModuleFile
in interfaceModuleEntry
- 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 File getFile()
- Returns:
- Returns the file.
-
asModule
public Module asModule() throws UnimplementedError
Description copied from interface:ModuleEntry
Precondition: isModuleFile().- Specified by:
asModule
in interfaceModuleEntry
- Returns:
- a Module view of this entry.
- Throws:
UnimplementedError
-
getContainer
public Module getContainer()
Description copied from interface:ModuleEntry
the containing module- Specified by:
getContainer
in interfaceModuleEntry
-
-