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

Parameterize routines with generic facades #46

Open
HeikoKlare opened this issue Aug 3, 2022 · 1 comment
Open

Parameterize routines with generic facades #46

HeikoKlare opened this issue Aug 3, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@HeikoKlare
Copy link
Contributor

HeikoKlare commented Aug 3, 2022

Currently, an AbstractRoutine provides a subtype of AbstractRoutinesFacade via a method returning an according generically typed argument.

protected def <T extends AbstractRoutinesFacade> T getRoutinesFacade() {
return routinesFacade as T
}

Since this requires an unsafe cast and thus depends on proper implementation and code generation to work without throwing runtime exceptions, we have to check whether it is possible to make the whole class generically types with the facade such that we achieve static type safeness.

Source:

Why can't we make a generic class to have this explicit?

Originally posted by @JanWittler in #42 (comment)

@HeikoKlare
Copy link
Contributor Author

The essential fix is quite easy (see #48), but it somehow breaks code generation from the Commonalities language. We have to figure out what the problems with the generator is (or remove the Commonalities language from active maintenance) before the fix in #48 can be applied.

@HeikoKlare HeikoKlare removed their assignment Aug 17, 2022
@TomWerm TomWerm added the enhancement New feature or request label Sep 23, 2022
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