jmx removed lazy init

This commit is contained in:
Willem Cazander 2022-10-15 14:18:09 +02:00
parent 5efc789b49
commit 5514f2c7b0

View file

@ -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);
}
}