|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensolaris.opengrok.analysis.FileAnalyzerFactory
public class FileAnalyzerFactory
Factory class which creates a FileAnalyzer
object and
provides information about this type of analyzers.
Nested Class Summary | |
---|---|
protected static interface |
FileAnalyzerFactory.Matcher
Interface for matchers which map file contents to analyzer factories. |
Constructor Summary | |
---|---|
protected |
FileAnalyzerFactory(java.lang.String[] suffixes,
java.lang.String[] magics,
FileAnalyzerFactory.Matcher matcher,
java.lang.String contentType,
FileAnalyzer.Genre genre)
Construct an instance of FileAnalyzerFactory . |
Method Summary | |
---|---|
FileAnalyzer |
getAnalyzer()
Get an analyzer. |
java.lang.String |
getContentType()
Get the content type (MIME type) for analyzers returned by this factory. |
FileAnalyzer.Genre |
getGenre()
The genre this analyzer factory belongs to. |
java.util.List<java.lang.String> |
getMagicStrings()
Get the list of magic strings recognized by this analyzer. |
java.util.List<FileAnalyzerFactory.Matcher> |
getMatchers()
Get matchers that map file contents to analyzer factories programmatically. |
java.util.List<java.lang.String> |
getSuffixes()
Get the list of file extensions recognized by this analyzer. |
protected FileAnalyzer |
newAnalyzer()
Create a new analyzer. |
void |
writeXref(java.io.InputStream in,
java.io.Writer out,
Annotation annotation,
Project project)
Write a cross referenced HTML file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FileAnalyzerFactory(java.lang.String[] suffixes, java.lang.String[] magics, FileAnalyzerFactory.Matcher matcher, java.lang.String contentType, FileAnalyzer.Genre genre)
FileAnalyzerFactory
. This constructor
should be used by subclasses to override default values.
suffixes
- list of suffixes to recognize (possibly null
)magics
- list of magic strings to recognize (possibly null
)matcher
- a matcher for this analyzer (possibly null
)contentType
- content type for this analyzer (possibly null
)genre
- the genre for this analyzer (if null
, Genre.DATA
is used)Method Detail |
---|
public final java.util.List<java.lang.String> getSuffixes()
public final java.util.List<java.lang.String> getMagicStrings()
Note: Currently this assumes that the file is encoded with ISO-8859-1.
public final java.util.List<FileAnalyzerFactory.Matcher> getMatchers()
public final java.lang.String getContentType()
null
if it is unknown)public final FileAnalyzer.Genre getGenre()
public final FileAnalyzer getAnalyzer()
newAnalyzer()
method.
FileAnalyzer
instancenewAnalyzer()
protected FileAnalyzer newAnalyzer()
public void writeXref(java.io.InputStream in, java.io.Writer out, Annotation annotation, Project project) throws java.io.IOException
in
.
in
- input sourceout
- output xref writerannotation
- annotation for the file (could be null
)project
- project the file belongs to (could be null
)
java.io.IOException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |