Java 类org.glassfish.jersey.server.model.ModelProcessor 实例源码

项目:ameba    文件:RsAddonFeature.java   
@Override
protected void configure() {
    bind(OptionsMethodProcessor.DefaultOptionsResponseGenerator.class)
            .to(OptionsResponseGenerator.class)
            .in(Singleton.class);

    bind(OptionsMethodProcessor.class)
            .to(ModelProcessor.class)
            .in(Singleton.class);

    bind(ParamConverters.TypeFromStringEnum.class)
            .to(ParamConverterProvider.class)
            .in(Singleton.class).ranked(10);

    bind(ParamConverters.DateProvider.class)
            .to(ParamConverterProvider.class)
            .in(Singleton.class).ranked(10);

    bind(ParamConverters.BooleanProvider.class)
            .to(ParamConverterProvider.class)
            .in(Singleton.class).ranked(10);
}
项目:ameba    文件:MvcBinder.java   
/**
 * {@inheritDoc}
 */
@Override
protected void configure() {
    bind(TemplateMethodInterceptor.class).to(WriterInterceptor.class).in(Singleton.class);
    //noinspection unchecked
    bind(ViewableMessageBodyWriter.class).to(MessageBodyWriter.class).in(Singleton.class);

    bind(TemplateModelProcessor.class).to(ModelProcessor.class).in(Singleton.class);
    bindAsContract(ResolvingViewableContext.class).in(Singleton.class);
    bind(ResolvingViewableContext.class).to(ViewableContext.class).in(Singleton.class).ranked(1);
}