org.opensolaris.opengrok.analysis.executables
Class ELFAnalyzer

java.lang.Object
  extended by org.apache.lucene.analysis.Analyzer
      extended by org.opensolaris.opengrok.analysis.FileAnalyzer
          extended by org.opensolaris.opengrok.analysis.executables.ELFAnalyzer

public class ELFAnalyzer
extends FileAnalyzer

Analyzes ELF (Executable and Linking Format) files. Created on September 23, 2005


Nested Class Summary
 
Nested classes/interfaces inherited from class org.opensolaris.opengrok.analysis.FileAnalyzer
FileAnalyzer.Genre
 
Field Summary
static int ELFDATA2LSB
           
static int SHT_CHECKSUM
           
static int SHT_DYNAMIC
           
static int SHT_DYNSYM
           
static int SHT_FINI_ARRAY
           
static int SHT_GNU_LIBLIST
           
static int SHT_GROUP
           
static int SHT_HASH
           
static int SHT_HIOS
           
static int SHT_HIPROC
           
static int SHT_HISUNW
           
static int SHT_HIUSER
           
static int SHT_INIT_ARRAY
           
static int SHT_LOOS
           
static int SHT_LOPROC
           
static int SHT_LOSUNW
           
static int SHT_LOUSER
           
static int SHT_NOBITS
           
static int SHT_NOTE
           
static int SHT_NULL
           
static int SHT_NUM
           
static int SHT_PREINIT_ARRAY
           
static int SHT_PROGBITS
           
static int SHT_REL
           
static int SHT_RELA
           
static int SHT_SHLIB
           
static int SHT_STRTAB
           
static int SHT_SUNW_COMDAT
           
static int SHT_SYMTAB
           
static int SHT_SYMTAB_SHNDX
           
 
Fields inherited from class org.opensolaris.opengrok.analysis.FileAnalyzer
ctags, project
 
Constructor Summary
protected ELFAnalyzer(FileAnalyzerFactory factory)
          Creates a new instance of ELFAnalyzer
 
Method Summary
 void analyze(org.apache.lucene.document.Document doc, java.io.InputStream in)
           
 void parseELF(java.io.FileInputStream f)
           
 org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName, java.io.Reader reader)
           
 void writeXref(java.io.Writer out)
          Write a cross referenced HTML file.
 
Methods inherited from class org.opensolaris.opengrok.analysis.FileAnalyzer
getFactory, getGenre, setCtags, writeXref
 
Methods inherited from class org.apache.lucene.analysis.Analyzer
getPositionIncrementGap, getPreviousTokenStream, reusableTokenStream, setPreviousTokenStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHT_NULL

public static final int SHT_NULL
See Also:
Constant Field Values

SHT_PROGBITS

public static final int SHT_PROGBITS
See Also:
Constant Field Values

SHT_SYMTAB

public static final int SHT_SYMTAB
See Also:
Constant Field Values

SHT_STRTAB

public static final int SHT_STRTAB
See Also:
Constant Field Values

SHT_RELA

public static final int SHT_RELA
See Also:
Constant Field Values

SHT_HASH

public static final int SHT_HASH
See Also:
Constant Field Values

SHT_DYNAMIC

public static final int SHT_DYNAMIC
See Also:
Constant Field Values

SHT_NOTE

public static final int SHT_NOTE
See Also:
Constant Field Values

SHT_NOBITS

public static final int SHT_NOBITS
See Also:
Constant Field Values

SHT_REL

public static final int SHT_REL
See Also:
Constant Field Values

SHT_SHLIB

public static final int SHT_SHLIB
See Also:
Constant Field Values

SHT_DYNSYM

public static final int SHT_DYNSYM
See Also:
Constant Field Values

SHT_INIT_ARRAY

public static final int SHT_INIT_ARRAY
See Also:
Constant Field Values

SHT_FINI_ARRAY

public static final int SHT_FINI_ARRAY
See Also:
Constant Field Values

SHT_PREINIT_ARRAY

public static final int SHT_PREINIT_ARRAY
See Also:
Constant Field Values

SHT_GROUP

public static final int SHT_GROUP
See Also:
Constant Field Values

SHT_SYMTAB_SHNDX

public static final int SHT_SYMTAB_SHNDX
See Also:
Constant Field Values

SHT_NUM

public static final int SHT_NUM
See Also:
Constant Field Values

SHT_LOOS

public static final int SHT_LOOS
See Also:
Constant Field Values

SHT_GNU_LIBLIST

public static final int SHT_GNU_LIBLIST
See Also:
Constant Field Values

SHT_CHECKSUM

public static final int SHT_CHECKSUM
See Also:
Constant Field Values

SHT_LOSUNW

public static final int SHT_LOSUNW
See Also:
Constant Field Values

SHT_SUNW_COMDAT

public static final int SHT_SUNW_COMDAT
See Also:
Constant Field Values

SHT_HISUNW

public static final int SHT_HISUNW
See Also:
Constant Field Values

SHT_HIOS

public static final int SHT_HIOS
See Also:
Constant Field Values

SHT_LOPROC

public static final int SHT_LOPROC
See Also:
Constant Field Values

SHT_HIPROC

public static final int SHT_HIPROC
See Also:
Constant Field Values

SHT_LOUSER

public static final int SHT_LOUSER
See Also:
Constant Field Values

SHT_HIUSER

public static final int SHT_HIUSER
See Also:
Constant Field Values

ELFDATA2LSB

public static final int ELFDATA2LSB
See Also:
Constant Field Values
Constructor Detail

ELFAnalyzer

protected ELFAnalyzer(FileAnalyzerFactory factory)
Creates a new instance of ELFAnalyzer

Parameters:
factory - The factory that creates ELFAnalyzers
Method Detail

analyze

public void analyze(org.apache.lucene.document.Document doc,
                    java.io.InputStream in)
Overrides:
analyze in class FileAnalyzer

parseELF

public void parseELF(java.io.FileInputStream f)
              throws java.io.IOException
Throws:
java.io.IOException

tokenStream

public org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName,
                                                          java.io.Reader reader)
Overrides:
tokenStream in class FileAnalyzer

writeXref

public void writeXref(java.io.Writer out)
               throws java.io.IOException
Write a cross referenced HTML file.

Overrides:
writeXref in class FileAnalyzer
Parameters:
out - Writer to write
Throws:
java.io.IOException - if an error occurs