Creating default implementations
This is relatively easy to get working
@Managed
interface MyComponent extends ComponentSpec {
}
class Rules extends RuleSource {
@ComponentSpec
void register( TypeBuilder<MyComponent> builder ) {}
}
But try doing
class DefaultMyCompoent implements MyComponent { ... }
class Rules extends RuleSource {
@ComponentSpec
void register( TypeBuilder<MyComponent>builder ) {
build.defaultImplementation(DefaultMyComponent)
}
}
and it wil fail with No factory registered to create an instance of implementation class
DefaultMyComponent’