mixinafIoc::ServiceBinder
afIoc::ServiceBinder
Passed into the AppModule.bind()
method. Allows a module to bind service mixins to service implementations. Example:
class AppModule { static Void bind(ServiceBinder binder) { binder.bind(MyService#, MyServiceImpl#) } }
This is an adaptation of ideas from Guice.
- bind
abstract ServiceBindingOptions bind(Type serviceMixin, Type serviceImpl)
Binds the service mixin to a service impl class. The default service id is the unqualified name of the service mixin.
- bindImpl
abstract ServiceBindingOptions bindImpl(Type implClass)
Defines a concrete implementation of a service. If
implClass
is a mixin in terms of an impl class, without a service mixin.