Package com.ibm.wala.classLoader
Class CompoundModule
- java.lang.Object
-
- com.ibm.wala.classLoader.CompoundModule
-
- All Implemented Interfaces:
Module,ModuleEntry,SourceModule
public class CompoundModule extends Object implements ModuleEntry, Module, SourceModule
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCompoundModule.Reader
-
Constructor Summary
Constructors Constructor Description CompoundModule(URL name, SourceModule[] constituents)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModuleasModule()Precondition: isModuleFile().StringgetClassName()SourceModule[]getConstituents()ModulegetContainer()the containing moduleIterator<ModuleEntry>getEntries()CompoundModule.ReadergetInputReader()InputStreamgetInputStream()StringgetName()URLgetURL()booleanisClassFile()booleanisModuleFile()booleanisSourceFile()
-
-
-
Constructor Detail
-
CompoundModule
public CompoundModule(URL name, SourceModule[] constituents)
-
-
Method Detail
-
getConstituents
public SourceModule[] getConstituents()
-
getEntries
public Iterator<ModuleEntry> getEntries()
- Specified by:
getEntriesin interfaceModule- Returns:
- an Iterator of the ModuleEntries in this Module.
-
isModuleFile
public boolean isModuleFile()
- Specified by:
isModuleFilein 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.
-
asModule
public Module asModule()
Description copied from interface:ModuleEntryPrecondition: isModuleFile().- Specified by:
asModulein interfaceModuleEntry- Returns:
- a Module view of this entry.
-
getClassName
public String getClassName()
- Specified by:
getClassNamein interfaceModuleEntry- Returns:
- the name of the class represented by this entry
-
getName
public String getName()
- Specified by:
getNamein interfaceModuleEntry- Returns:
- a String that represents the name of the file described by this object
-
getURL
public URL getURL()
- Specified by:
getURLin interfaceSourceModule
-
isClassFile
public boolean isClassFile()
- Specified by:
isClassFilein interfaceModuleEntry- Returns:
- true if the file is a class file.
-
isSourceFile
public boolean isSourceFile()
- Specified by:
isSourceFilein interfaceModuleEntry- Returns:
- true if the file is a source file.
-
getInputStream
public InputStream getInputStream()
- Specified by:
getInputStreamin interfaceModuleEntry- Returns:
- an InputStream which provides the contents of this logical file.
-
getInputReader
public CompoundModule.Reader getInputReader()
- Specified by:
getInputReaderin interfaceSourceModule
-
getContainer
public Module getContainer()
Description copied from interface:ModuleEntrythe containing module- Specified by:
getContainerin interfaceModuleEntry
-
-