Package com.ibm.wala.classLoader
Class JarFileEntry
- java.lang.Object
-
- com.ibm.wala.classLoader.JarFileEntry
-
- All Implemented Interfaces:
ModuleEntry
public class JarFileEntry extends Object implements ModuleEntry
An entry in a Jar file.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JarFileEntry(String entryName, JarFileModule jarFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Module
asModule()
Precondition: isModuleFile().boolean
equals(Object obj)
String
getClassName()
JarFileModule
getContainer()
the containing moduleInputStream
getInputStream()
JarFile
getJarFile()
String
getName()
long
getSize()
int
hashCode()
boolean
isClassFile()
boolean
isModuleFile()
boolean
isSourceFile()
String
toString()
-
-
-
Constructor Detail
-
JarFileEntry
protected JarFileEntry(String entryName, JarFileModule jarFile)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceModuleEntry
- Returns:
- a String that represents the name of the file described by this object
-
isClassFile
public boolean isClassFile()
- Specified by:
isClassFile
in interfaceModuleEntry
- Returns:
- true if the file is a class file.
-
getInputStream
public InputStream getInputStream()
- Specified by:
getInputStream
in interfaceModuleEntry
- Returns:
- an InputStream which provides the contents of this logical file.
-
getSize
public long getSize()
-
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.
-
asModule
public Module asModule()
Description copied from interface:ModuleEntry
Precondition: isModuleFile().- Specified by:
asModule
in interfaceModuleEntry
- Returns:
- a Module view of this entry.
-
getJarFile
public JarFile getJarFile()
-
getContainer
public JarFileModule getContainer()
Description copied from interface:ModuleEntry
the containing module- Specified by:
getContainer
in interfaceModuleEntry
-
getClassName
public String getClassName()
- Specified by:
getClassName
in interfaceModuleEntry
- Returns:
- the name of the class represented by this entry
-
isSourceFile
public boolean isSourceFile()
- Specified by:
isSourceFile
in interfaceModuleEntry
- Returns:
- true if the file is a source file.
-
-