jmx removed lazy init
This commit is contained in:
parent
5efc789b49
commit
5514f2c7b0
|
@ -7,6 +7,8 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreKeyʸᴰ;
|
|||
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnSpiderEgg注;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnꝐŕḯṿª₮ḕ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnꝐŕḯṿª₮ḕInitPhaseʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnꝐŕḯṿª₮ḕInit注;
|
||||
import love.distributedrebirth.bassboonyd.DefaultEnumBaseʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.info.BãßBȍőnAnnotation注;
|
||||
import love.distributedrebirth.bassboonyd.info.BãßBȍőnAuthor注;
|
||||
|
@ -19,6 +21,11 @@ public interface DefaultEnumBaseᴶᴹˣ<T,K extends BãßBȍőnCoffinStoreKeyʸ
|
|||
public static class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ {
|
||||
private static final String GHOST_KEY_JMX = "JMX";
|
||||
|
||||
@BãßBȍőnꝐŕḯṿª₮ḕInit注(phase = BãßBȍőnꝐŕḯṿª₮ḕInitPhaseʸᴰ.BOON_PRE_BOOT)
|
||||
private static void init(DefaultEnumBaseᴶᴹˣ<?,?> boon) {
|
||||
boon.toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).PUT_GHOST(Ꝑŕḯṿª₮ḕ.GHOST_KEY_JMX, new HashMap<>());
|
||||
}
|
||||
|
||||
private static <X> X buildJmxGhost(DefaultEnumBaseᴶᴹˣ<?,?> boon, String name, X result) {
|
||||
boon.toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_MAP_OBJ(Ꝑŕḯṿª₮ḕ.GHOST_KEY_JMX).put(name, result);
|
||||
return result;
|
||||
|
@ -51,11 +58,6 @@ public interface DefaultEnumBaseᴶᴹˣ<T,K extends BãßBȍőnCoffinStoreKeyʸ
|
|||
}
|
||||
|
||||
public static Map<String, Object> jmxGhosts(BãßBȍőnCoffinʸᴰ<?> BBC) {
|
||||
Map<String, Object> result = BBC.UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_MAP_OBJ(Ꝑŕḯṿª₮ḕ.GHOST_KEY_JMX);
|
||||
if (result == null) {
|
||||
result = new HashMap<>();
|
||||
BBC.UNHOLY(Ꝑŕḯṿª₮ḕ.class).PUT_GHOST(Ꝑŕḯṿª₮ḕ.GHOST_KEY_JMX, result);
|
||||
}
|
||||
return result;
|
||||
return BBC.UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_MAP_OBJ(Ꝑŕḯṿª₮ḕ.GHOST_KEY_JMX);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue