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

don't retrieve the ImportManager by reflection #2889

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

LorenzoBettini
Copy link
Contributor

Since we already assume that the import manager is part of the appendable, which is a TreeAppendable, I think it's better to do the case and expose getImportManager in TreeAppendable than to call that method with two reflective calls.
This would also allow clients to provide a custom TreeAppendable; with the reflective call this latter use-case would not be supported

Since we already assume that the import manager is part of the
appendable, which is a TreeAppendable, I think it's better to do the
case and expose getImportManager in TreeAppendable than to call that
method with two reflective calls.
This would also allow clients to provide a custom TreeAppendable; with
the reflective call this latter use-case would not be supported
@LorenzoBettini
Copy link
Contributor Author

@szarnekow I'll split #2888 into separate PRs.

@@ -839,12 +839,7 @@ class JvmModelGenerator implements IGenerator {
}

def getImportManager(ITreeAppendable appendable) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the XbaseCompiler work with TreeAppendable instead of ITreeAppendable on its APIs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szarnekow from what I see and understand, the XbaseCompiler does not need anything more than what the ITreeAppendable interface provides and doesn't seem to make further assumptions.
On the contrary, JvmModelGenerator completely relies on TreeAppendable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh sadness. We cannot easily change signatures here. Casting seems the best we can do.

@LorenzoBettini LorenzoBettini merged commit c73589d into main Jan 8, 2024
9 checks passed
@LorenzoBettini LorenzoBettini deleted the lb_xbase_cleanup-2 branch January 8, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants