class LibReader
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private nl.lxtreme.binutils.elf.Dynamic[] |
dynamics
An array of Dynamic objects.
|
private nl.lxtreme.binutils.elf.Elf |
elf
The elf.
|
private ArchiveGenerator |
gen
The
ArchiveGenerator to use. |
private java.util.List<Module> |
modules
List of modules.
|
| Modifier | Constructor and Description |
|---|---|
protected |
LibReader(ArchiveGenerator gen,
java.io.File aFile)
constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
addDeps(Module mod)
add the LibReferences to the module.
|
private void |
addModule(Module entry)
add to modules.
|
private java.lang.String |
choosePath(Module module)
choose the path to referenced File.
|
private void |
createLib(java.lang.String name)
create lib an add to modules.
|
private void |
createProg(java.lang.String rPath)
creates Program and add to modules.
|
protected nl.lxtreme.binutils.elf.Elf |
getElf() |
void |
read()
reads the data.
|
private void |
resolveReferences(Module module)
resolve the unresolved references.
|
private java.lang.Boolean |
searchLibFile(java.lang.String string)
Searches a directory for a library.
|
private void |
splitInDynamicEntries()
Reads all dynamic entries from an ELF file.
|
private final nl.lxtreme.binutils.elf.Elf elf
private final java.util.List<Module> modules
private nl.lxtreme.binutils.elf.Dynamic[] dynamics
private final ArchiveGenerator gen
ArchiveGenerator to use.protected LibReader(ArchiveGenerator gen, java.io.File aFile) throws java.io.IOException
gen - the ArchiveGenerator to useaFile - file to read.java.io.IOException - file is empty.public void read()
throws java.io.IOException,
LibReaderException,
CheckScriptException
java.io.IOException - from fileLibReaderException - if no dynamic entries.CheckScriptException - if it fails.protected nl.lxtreme.binutils.elf.Elf getElf()
private void splitInDynamicEntries()
throws java.io.IOException
java.io.IOException - if an I/O error occursprivate void addDeps(Module mod) throws ReferencedModuleNotFoundException, java.io.FileNotFoundException, CheckScriptException
mod - the moduleReferencedModuleNotFoundException - if module not found.CheckScriptException - if it failsjava.io.FileNotFoundException - if no file is found.private void createLib(java.lang.String name)
throws ReferencedModuleNotFoundException,
java.io.FileNotFoundException,
CheckScriptException
name - the name of the SONameReferencedModuleNotFoundException - if dependency not found.CheckScriptException - if it fails.java.io.FileNotFoundException - if no file is foundprivate void createProg(java.lang.String rPath)
throws ReferencedModuleNotFoundException,
java.io.FileNotFoundException,
CheckScriptException
rPath - the rPathStringReferencedModuleNotFoundException - if dependency not foundCheckScriptException - if it fails.java.io.FileNotFoundException - if no file is foundprivate void addModule(Module entry)
entry - the entry to add.private void resolveReferences(Module module) throws ReferencedModuleNotFoundException, java.io.FileNotFoundException, CheckScriptException
module - to resolveReferencedModuleNotFoundException - if Module is not found.CheckScriptException - if it failsjava.io.FileNotFoundException - if no file is found.private java.lang.String choosePath(Module module) throws ReferencedModuleNotFoundException
module - the module to find the pathReferencedModuleNotFoundException - if module is not foundprivate java.lang.Boolean searchLibFile(java.lang.String string)
string - The directory to search.