Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Motif Scopes should automatically provide all the interfaces that they implement as bindings within the scope #105

Open
andreasnomikos opened this issue Aug 11, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@andreasnomikos
Copy link

andreasnomikos commented Aug 11, 2019

A common and useful pattern is as follows

public class Foo(ParentComponent) {

public interface ParentComponent {
  Bar bar()
}
}

This pattern allows every single class that defined to somewhat act as its own "scope" with a clear api towards the outside world

to better support this pattern motif.Scopes should automatically provide all the interfaces that they implement as bindings

@motif.Scope
interface  Scope extends Foo.ParentComponent {

 @motif.Objects 
 abstract class Objects {
    abstract Foo foo();

    abstract Foo.ParentComponent fooParent(Scope scope) <-- this declaration could be now be avoided 
 }
}
@Leland-Takamine
Copy link
Collaborator

Are there any cases you can think of where the automatic provision of the extended interfaces would be problematic?

@Leland-Takamine Leland-Takamine added the enhancement New feature or request label Aug 21, 2019
@andreasnomikos
Copy link
Author

Yes we can't @expose them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants