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

Consider using reflection in place of the proxy classes #104

Open
lupinitylabs opened this issue Dec 22, 2024 · 0 comments
Open

Consider using reflection in place of the proxy classes #104

lupinitylabs opened this issue Dec 22, 2024 · 0 comments

Comments

@lupinitylabs
Copy link
Member

Currently the proxy classes are used as a way to access protected methods in the SchemaStates and provide control over the way these are called. However, the way it is built right now does not give access to the originally used instance, but to the proxy deriving a new instance. That is fine for what it is used right now, but useless for any other case, and might even be problematic in the future.

Instead, we should consider removing the abstract proxies and have the proxy classes not extend the SchemaState, but just work with the SchemaState instance that is passed in through the constructor. In order to call the protected methods, it would be needed to use reflection.

This also means that we have to override or replace and method inside the SchemaStates that does method calls on itself, like we already did with the load() method, for instance.

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

No branches or pull requests

1 participant