GBInjectable
AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: base/gb_injectable.gd
Version: 5.0
class_name: GBInjectable
extends: RefCounted
Summary
Lightweight interface for RefCounted objects that require DI.
Use this base class to mark RefCounted helpers as eligible for dependency injection
via the project’s composition container. Subclasses must implement resolve_gb_dependencies
and get_dependency_issues to receive and verify required services.
Signals
(none)
Exports
(none)
Methods
resolve_gb_dependencies()- Override this method to receive injected dependencies.
This method will be called during initialization or when explicitly injected.[br][br]
[b]Fail‑fast policy:[/b] This abstract method intentionally provides NO stub implementation (no silent
pass). Any subclass must implement it; omission will surface immediately at runtime when injection occurs.[br][br] [code]container[/code]: [i]GBCompositionContainer[/i] - The dependency container with all services [return]bool - True if dependencies were successfully resolved, false otherwise
- Override this method to receive injected dependencies.
This method will be called during initialization or when explicitly injected.[br][br]
[b]Fail‑fast policy:[/b] This abstract method intentionally provides NO stub implementation (no silent
get_runtime_issues()- Validates that all required dependencies have been properly injected. Returns list of validation issue messages (empty if valid).[br][br] This is abstract & body-less to avoid masking missing overrides with a default [] return.
inject_dependencies()- Helper method to manually inject dependencies into this object. Useful when creating RefCounted objects that need injection outside of the normal flow.[br][br] [code]container[/code]: [i]GBCompositionContainer[/i] - The dependency container