Class ObflParserFactoryImpl
- java.lang.Object
-
- org.daisy.dotify.formatter.impl.obfl.ObflParserFactoryImpl
-
- All Implemented Interfaces:
ObflParserFactoryService
public class ObflParserFactoryImpl extends Object implements ObflParserFactoryService
Provides an
OBFL parser factoryimplementation.Produces instances of
ObflParserImpl.
-
-
Constructor Summary
Constructors Constructor Description ObflParserFactoryImpl()Creates a new obfl parser factory instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObflParsernewObflParser()Creates a new ObflParser.voidsetCreatedWithSPI()Informs the implementation that it was discovered and instantiated using information collected from a file within theMETA-INF/servicesdirectory.voidsetExpressionFactory(ExpressionFactory service)Sets a factory dependency.voidsetFormatterFactory(FormatterFactory service)Sets a factory dependency.voidsetTextBorderFactoryMaker(TextBorderFactoryMakerService service)Sets a factory dependency.voidunsetExpressionFactory(ExpressionFactory service)Removes a factory dependency.voidunsetFormatterFactory(FormatterFactory service)Removes a factory dependency.voidunsetTextBorderFactoryMaker(TextBorderFactoryMakerService service)Removes a factory dependency.
-
-
-
Method Detail
-
newObflParser
public ObflParser newObflParser()
Description copied from interface:ObflParserFactoryServiceCreates a new ObflParser.- Specified by:
newObflParserin interfaceObflParserFactoryService- Returns:
- returns a new OBFL parser.
-
setFormatterFactory
public void setFormatterFactory(FormatterFactory service)
Sets a factory dependency.- Parameters:
service- the dependency
-
unsetFormatterFactory
public void unsetFormatterFactory(FormatterFactory service)
Removes a factory dependency.- Parameters:
service- the dependency to remove
-
setTextBorderFactoryMaker
public void setTextBorderFactoryMaker(TextBorderFactoryMakerService service)
Sets a factory dependency.- Parameters:
service- the dependency
-
unsetTextBorderFactoryMaker
public void unsetTextBorderFactoryMaker(TextBorderFactoryMakerService service)
Removes a factory dependency.- Parameters:
service- the dependency to remove
-
setExpressionFactory
public void setExpressionFactory(ExpressionFactory service)
Sets a factory dependency.- Parameters:
service- the dependency
-
unsetExpressionFactory
public void unsetExpressionFactory(ExpressionFactory service)
Removes a factory dependency.- Parameters:
service- the dependency to remove
-
setCreatedWithSPI
public void setCreatedWithSPI()
Description copied from interface:ObflParserFactoryServiceInforms the implementation that it was discovered and instantiated using information collected from a file within the
META-INF/servicesdirectory. In other words, it was created using SPI (service provider interfaces).This information, in turn, enables the implementation to use the same mechanism to set dependencies as needed.
If this information is not given, an implementation should avoid using SPIs and instead use declarative services for dependency injection as specified by OSGi. Note that this also applies to several newInstance() methods in the Java API.
The class that created an instance with SPI must call this method before putting it to use.
- Specified by:
setCreatedWithSPIin interfaceObflParserFactoryService
-
-