|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAbstractFactory
org.extex.engine.typesetter.TypesetterFactory
public class TypesetterFactory
This is the factory for instances of
Typesetter. This factory inherits
its properties from the
AbstractFactory. Among them the
support for configuration and logging.
Mainly the configuration needs to specify which class to use for the Typesetter. The configuration provides a mapping from a type name to the sub-configuration to be used. The name of the class is given as the argument class of the sub-configuration as shown below.
<Typesetter default="TeX">
<TeX class="org.extex.typesetter.impl.TypesetterImpl"
direction="lr">
<PageBuilder class="org.extex.typesetter.pageBuilder.impl.PageBuilderImpl"/>
<ParagraphBuilder class="org.extex.typesetter.paragraphBuilder.texImpl.TeXParagraphBuilder">
<Hyphenator class="org.extex.typesetter.paragraphBuilder.texImpl.TeXParagraphBuilder"/>
</ParagraphBuilder>
<NodeFactory class="org.extex.typesetter.type.node.factory.CachingNodeFactory"/>
</TeX>
<develop class="org.extex.typesetter.impl.TypesetterImpl"
direction="lr">
<PageBuilder class="org.extex.typesetter.pageBuilder.impl.PageBuilderImpl"/>
<ParagraphBuilder class="org.extex.typesetter.(new JUnitCore())"/>
<NodeFactory class="org.extex.typesetter.type.node.factory.CachingUnicodeNodeFactory"/>
</develop>
</Typesetter>
The named class need to implement the interface
Typesetter. If this interface is not
implemented an error is raised.
The configuration is passed down to the new instance if it implements the
interface Configurable.
If the class implements the interface
LogEnabled then a logger is
passed to the new instance. For this purpose the factory itself is log
enabled to receive the logger.
| Constructor Summary | |
|---|---|
TypesetterFactory()
Creates a new object. |
|
| Method Summary | |
|---|---|
Typesetter |
newInstance(java.lang.String type,
Context context,
BackendDriver backend,
Interpreter interpreter)
Get an instance of a typesetter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypesetterFactory()
| Method Detail |
|---|
public Typesetter newInstance(java.lang.String type,
Context context,
BackendDriver backend,
Interpreter interpreter)
throws TypesetterException
type - the symbolic name of the configuration to usecontext - the interpreter contextbackend - the back-end driverinterpreter - the interpreter
ConfigurationException - in case of an configuration error
TypesetterException - in case of another error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||