Silk DI 0.6


se.jbee.inject.service
Class ServiceModule

Object
  extended by se.jbee.inject.service.ServiceModule
All Implemented Interfaces:
Bundle, Module

public abstract class ServiceModule
extends Object
implements Bundle, Module

When binding ServiceMethods this Module can be extended. It provides service-related build methods.

Author:
Jan Bernitt (jan@jbee.se)

Field Summary
static Instance<Inspector> SERVICE_INSPECTOR
          The Inspector picks the Methods that are used to implement ServiceMethods.
 
Constructor Summary
ServiceModule()
           
 
Method Summary
protected  void bindServiceInspectorTo(Inspector inspector)
           
protected  void bindServiceMethodsIn(Class<?> service)
           
 void bootstrap(Bootstrapper bootstrap)
           
protected abstract  void declare()
           
 void declare(Bindings bindings)
           
protected  void extend(ServiceInvocation.ServiceInvocationExtension type, Class<? extends ServiceInvocation<?>> invocation)
           
protected
<T> Binder.TypedBinder<T>
starbind(Class<T> service)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_INSPECTOR

public static final Instance<Inspector> SERVICE_INSPECTOR
The Inspector picks the Methods that are used to implement ServiceMethods. This abstraction allows to customize what methods are bound as ServiceMethods. The Inspector.methodsIn(Class) should return all methods in the given Class that should be used to implement a ServiceMethod.

Constructor Detail

ServiceModule

public ServiceModule()
Method Detail

bindServiceMethodsIn

protected final void bindServiceMethodsIn(Class<?> service)

bindServiceInspectorTo

protected final void bindServiceInspectorTo(Inspector inspector)

extend

protected final void extend(ServiceInvocation.ServiceInvocationExtension type,
                            Class<? extends ServiceInvocation<?>> invocation)

starbind

protected final <T> Binder.TypedBinder<T> starbind(Class<T> service)

bootstrap

public final void bootstrap(Bootstrapper bootstrap)
Specified by:
bootstrap in interface Bundle
Parameters:
bootstrap - The Bootstrapper this Bundle should install itself to.

declare

public void declare(Bindings bindings)
Specified by:
declare in interface Module
Parameters:
bindings - use to declare made bound within this Module.

declare

protected abstract void declare()

Silk DI 0.6