WolfyScript / WolfyUtils-Spigot

The WolfyUtilities implementation for the Spigot platform
10 stars 4 forks source link

Add Dependency Management for Plugin Integrations #82

Closed WolfyScript closed 3 months ago

WolfyScript commented 3 months ago

This adds a whole new dependency management system to make it easier to define class dependencies.

A class can be annotated with the DependencyResolverSettings annotation to apply a DependencyResolver that resolves the dependencies for that class.

Specifying the PluginIntegrationDependencyResolver using the DependencyResolverSettings annotation looks for the additional PluginIntegrationDependencyResolverSettings annotation, that declares the specified integration as a dependency.

Fields in a class can be annotated with the DependencySource annotation to propagate dependencies from the field type to the containing class.

Additionally, this PR replaces the Validation system with a new Verification system. The main difference is that the new system no longer supports revalidation. It can only verify an object once and return a result, that is final. To "reverify" it, just run the verification again. This solves quite a few logic issues.