Interface ClosureOwner<D>
- Type Parameters:
D- The type of the owner delegate to be used on top of the original owner
- All Known Subinterfaces:
ClosureOwner.MinecraftDependency,ClosureOwner.MinecraftDependencyWithAccessTransformers
public interface ClosureOwner<D>
A closure owner is used to replace a closure's owner to allow for multiple delegates.
This is done to allow for buildscript authors to work with an abstraction that implements multiple interfaces
without needing to create an object that does so. For example, the MinecraftDependency
implementation is not itself an ExternalModuleDependency, but the ClosureOwner.MinecraftDependency closure owner provides an
abstraction that delegates to both of those interfaces simultaneously.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA closure owner that delegates toMinecraftDependencyandExternalModuleDependency.static interfaceA closure owner that delegates toMinecraftDependencyWithAccessTransformersandExternalModuleDependency. -
Method Summary
Modifier and TypeMethodDescriptionGets the owner delegate for this closure owner.
-
Method Details
-
getOwnerDelegate
D getOwnerDelegate()Gets the owner delegate for this closure owner.
The owner delegate sits on top of the Closure's original owner, and is used primarily on top of it when the closure owner is invoked. If a member can't be found in the owner delegate, the original owner is queried instead.
- Returns:
- The owner delegate
-