@Component(role=ParserManager.class) public class DefaultParserManager extends java.lang.Object implements ParserManager
ParserManager
interface.Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,Parser> |
parsers |
ROLE
Constructor and Description |
---|
DefaultParserManager() |
Modifier and Type | Method and Description |
---|---|
Parser |
getParser(java.lang.String id)
Returns the parser that corresponds to the given id.
|
@Requirement(role=Parser.class) private java.util.Map<java.lang.String,Parser> parsers
public Parser getParser(java.lang.String id) throws ParserNotFoundException
getParser
in interface ParserManager
id
- The identifier.ParserNotFoundException
- if no parser could be found
for the given id.