Skip to content

Add PluginContainer#resource and deprecate ResourceQueryable - #25

Open
Yeregorix wants to merge 2 commits into
masterfrom
feature/container-resource
Open

Add PluginContainer#resource and deprecate ResourceQueryable#25
Yeregorix wants to merge 2 commits into
masterfrom
feature/container-resource

Conversation

@Yeregorix

Copy link
Copy Markdown
Member

Plugin Spark needs to access the PluginResource of a PluginContainer to determine the Path of the corresponding jar.
It is currently using reflection to obtain the resource (see).

We can simply expose a getter. A PluginContainer is always constructed from a PluginResource anyway.
Following that, ResourceQueryable becomes kinda useless and redundant so I deprecated it for a future removal.

I also think that
container.resource().locateResource(path) could become container.resource().locate(path) for better clarity.
The same goes for openResource.

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.

1 participant