Java 类org.jdom2.input.sax.SAXHandlerFactory 实例源码

项目:ProjectAres    文件:MapManifest.java   
@Override
protected void configure() {
    // Setup @MapScoped and bind MapDefinition as a seed object
    install(new MapInjectionScope().new Manifest());

    final FactoryModuleBuilder fmb = new FactoryModuleBuilder();
    install(fmb.build(MapFilePreprocessor.Factory.class));
    install(fmb.build(MapLogger.Factory.class));

    bind(SAXHandler.class).to(BoundedSAXHandler.class);
    bind(SAXHandlerFactory.class).toInstance(BoundedSAXHandler::new);
    bind(JDOMFactory.class).to(BoundedJDOMFactory.class);

    bind(PGMMap.Factory.class);
    bind(MapConfiguration.class).to(PGMMapConfiguration.class);
    bind(MapDoc.class).to(MapDocument.class);

    inSet(MapRootParser.class);

    bind(ValidationContext.class).to(FeatureDefinitionContext.class);

    bind(MapModuleContext.class).in(MapScoped.class);
    bind(ModuleExceptionHandler.class).to(MapModuleContext.class);

    expose(MapDefinition.class);
    expose(PGMMap.class);

    requestStaticInjection(XMLUtils.class);
}
项目:ProjectAres    文件:MapManifest.java   
@Provides
SAXBuilder saxBuilder(SAXHandlerFactory saxHandlerFactory, JDOMFactory jdomFactory) {
    return new SAXBuilder(null, saxHandlerFactory, jdomFactory);
}