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
All Implemented Interfaces:
java.io.Closeable

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
 
Fields inherited from class org.opensolaris.opengrok.analysis.FileAnalyzer
ctags, project
 
Fields inherited from class org.apache.lucene.analysis.Analyzer
overridesTokenStreamMethod
 
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, setProject, writeXref
 
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, reusableTokenStream, setOverridesTokenStreamMethod, setPreviousTokenStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)
             throws java.io.IOException
Overrides:
analyze in class FileAnalyzer
Throws:
java.io.IOException

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