public final class AttachableHelper
extends java.lang.Object
IAttachable
Constructor and Description |
---|
AttachableHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
tryAttachTo(IServiceContainer services,
IAttachable attachable)
Helper method which attaches
IAttachable instance to target IServiceContainer |
static <T extends IServiceProvider & IAttachable> |
tryAttachTo(T target,
IAttachable attachable)
Helper method which attaches
IAttachable instance to target IAttachable |
static void |
tryDetach(IAttachable attachable)
Helper method which detaches
IAttachable instance |
static void |
tryDetachFrom(IAttachable target,
IAttachable attachable)
Helper method which detaches
IAttachable instance from target IAttachable |
public static <T extends IServiceProvider & IAttachable> void tryAttachTo(T target, IAttachable attachable)
IAttachable
instance to target IAttachable
target
- The target to attach toattachable
- The IAttachable
to attachpublic static void tryDetachFrom(IAttachable target, IAttachable attachable)
IAttachable
instance from target IAttachable
target
- The target to attach toattachable
- The IAttachable
to detachpublic static void tryAttachTo(IServiceContainer services, IAttachable attachable)
IAttachable
instance to target IServiceContainer
services
- The target services to attach toattachable
- The IAttachable
to attachpublic static void tryDetach(IAttachable attachable)
IAttachable
instanceattachable
- The IAttachable
to detach