public abstract class Lifecycles extends Object
Initializable.init() and
Destroyable.destroy() methods cleanly on any object.| 构造器和说明 |
|---|
Lifecycles() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
destroy(Collection c)
Calls
destroy for each object in the collection. |
static void |
destroy(Destroyable d) |
static void |
destroy(Object o) |
static void |
init(Collection c)
Calls
init for each object in the collection. |
static void |
init(Initializable initializable) |
static void |
init(Object o) |
public static void init(Object o) throws InitializationException
public static void init(Initializable initializable) throws InitializationException
public static void init(Collection c) throws InitializationException
init for each object in the collection. If the collection is null or empty,
this method returns quietly.c - the collection containing objects to init.InitializationException - if unable to initialize one or more instances.public static void destroy(Object o)
public static void destroy(Destroyable d)
public static void destroy(Collection c)
destroy for each object in the collection.
If the collection is null or empty, this method returns quietly.c - the collection of objects to destroy.Copyright © 2021. All rights reserved.