This commit is contained in:
Willem 2022-02-06 17:19:05 +01:00
parent a3f58468f5
commit 36e349c152
20 changed files with 356 additions and 164 deletions

View file

@ -1,11 +1,10 @@
package love.distributedrebirth.bassboonyd;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface BãßBȍőnCoffinOpenʸᴰ<T extends BãßBȍőnCoffinStoreKeyʸᴰ> extends BãßBȍőnCoffinʸᴰ<T> {
public interface BãßBȍőnCoffinOpenʸᴰ<T extends BãßBȍőnCoffinStoreKeyʸᴰ> extends BãßBȍőnCoffinʸᴰ<T>, DefaultInitMethodʸᴰ {
void LOCK_COFFIN();
@ -19,18 +18,6 @@ public interface BãßBȍőnCoffinOpenʸᴰ<T extends BãßBȍőnCoffinStoreKey
PUT_OBJ(key, new HashMap<>());
}
default void BOON_INIT(Object boon) {
try {
for (Method m:boon.getClass().getMethods()) {
if (m.isAnnotationPresent(BãßBȍőnInitMethodʸᴰ.class)) {
m.invoke(boon, this);
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
static <Y extends BãßBȍőnCoffinStoreKeyʸᴰ> BãßBȍőnCoffinOpenʸᴰ<Y> newInstance() {
return new BãßBȍőnCoffinOpenʸᴰ<Y>() {
final Map<Y,Object> initMap = new HashMap<>();

View file

@ -5,8 +5,22 @@ public class BãßBȍőnConstantsʸᴰ {
public static final String STR_VALUES = "values";
public static final String STR_NAME = "name";
public static final String STR_TYPE = "type";
public static final String STR_DOT = ".";
public static final String STR_EMPTY = "";
public static final String STR_SPACE = " ";
public static final String STR_COMMA = ",";
public static final String STR_COLON = ":";
public static final String STR_IS = "=";
public static final int INT_ZERO = 0;
public static final int INT_ONE = 1;

View file

@ -2,7 +2,9 @@ package love.distributedrebirth.bassboonyd;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
@BãßBȍőnAnnotationInfoʸᴰ(required = {BãßBȍőnClassInfoʸᴰ.class, BãßBȍőnAuthorInfoʸᴰ.class})
public interface BãßBȍőnEnumʸᴰ<T> extends DefaultAuthorInfoʸᴰ,DefaultClassInfoʸᴰ,DefaultPackageInfoʸᴰ {
public interface DefaultEnumBaseʸᴰ<T> extends DefaultAuthorInfoʸᴰ,DefaultClassInfoʸᴰ,DefaultPackageInfoʸᴰ {
int ordinal();
String name();
@ -23,8 +25,9 @@ public interface BãßBȍőnEnumʸᴰ<T> extends DefaultAuthorInfoʸᴰ,DefaultC
}
}
/*
default String BȍőnNaamI18N() {
return BãßClassNaam() + BãßBȍőnConstantsʸᴰ.STR_DOT + name();
}
*/
}

View file

@ -1,13 +1,7 @@
package love.distributedrebirth.bassboonyd;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface BãßBȍőnEnumInstanceʸᴰ<T> extends BãßBȍőnEnumʸᴰ<T> {
int ordinal();
default T BȍőnInstance() {
return BãßInstances()[ordinal()];
}
public interface DefaultEnumInstanceʸᴰ<T> extends DefaultEnumBaseʸᴰ<T> {
default T BãßInstance() {
return BãßInstances()[BãßBȍőnConstantsʸᴰ.INT_ZERO];

View file

@ -7,9 +7,7 @@ import java.util.function.Consumer;
import java.util.stream.Stream;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface BãßBȍőnEnumSetʸᴰ<T> extends BãßBȍőnEnumʸᴰ<T> {
int ordinal();
public interface DefaultEnumSetʸᴰ<T> extends DefaultEnumBaseʸᴰ<T> {
default int BȍőnRangTelNul() {
return ordinal();

View file

@ -0,0 +1,20 @@
package love.distributedrebirth.bassboonyd;
import java.lang.reflect.Method;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
@BãßBȍőnAnnotationInfoʸᴰ(required = {})
public interface DefaultInitMethodʸᴰ {
default void BOON_INIT(Object boon) {
try {
for (Method m:boon.getClass().getMethods()) {
if (m.isAnnotationPresent(BãßBȍőnInitMethodʸᴰ.class)) {
m.invoke(boon, this);
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

View file

@ -1,116 +0,0 @@
package love.distributedrebirth.bassboonyd.jmx;
import java.lang.management.ManagementFactory;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.management.Attribute;
import javax.management.AttributeList;
import javax.management.AttributeNotFoundException;
import javax.management.DynamicMBean;
import javax.management.InvalidAttributeValueException;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanException;
import javax.management.MBeanInfo;
import javax.management.MBeanNotificationInfo;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.management.ReflectionException;
import love.distributedrebirth.bassboonyd.BãßBȍőnAnnotationInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreKeyʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnEnumʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
@BãßBȍőnAnnotationInfoʸᴰ(required = {BãßBȍőnClassInfoʸᴰ.class, BãßBȍőnAuthorInfoʸᴰ.class})
public interface BãßBȍőnEnumJmxʸᴰ<T,K extends BãßBȍőnCoffinStoreKeyʸᴰ> extends BãßBȍőnEnumʸᴰ<T>,BãßBȍőnCoffinStoreʸᴰ<K> {
@SuppressWarnings("unchecked")
default void BȍőnJmxInit(K key) {
BãßBȍőnCoffinOpenʸᴰ<K> coffin = BãßBȍőnCoffinOpenʸᴰ.class.cast(GET_BBC());
coffin.PUT_MAP(key);
try {
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
ObjectName objectName1 = new ObjectName(BãßPackageNaam() + ":name=" + BãßClassNaam());
server.registerMBean(new GuageDynamicMBean(GET_BBC().GET_MAP_OBJ(key)), objectName1);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
default GuageCounterᴶᴹˣ BȍőnJmxInitGuageCounter(K key, String name) {
return BȍőnJmxInitGuageCounter(key,name,"");
}
default GuageCounterᴶᴹˣ BȍőnJmxInitGuageCounter(K key, String name, String description) {
GuageCounterᴶᴹˣ result = new GuageCounterᴶᴹˣ(name, description);
GET_BBC().GET_MAP_OBJ(key).put(name, result);
return result;
}
default StringAttributeᴶᴹˣ BȍőnJmxInitStringAttribute(K key, String name, String description) {
StringAttributeᴶᴹˣ result = new StringAttributeᴶᴹˣ(name, description);
GET_BBC().GET_MAP_OBJ(key).put(name, result);
return result;
}
default BooleanAttributeᴶᴹˣ BȍőnJmxInitBooleanAttribute(K key, String name, String description) {
BooleanAttributeᴶᴹˣ result = new BooleanAttributeᴶᴹˣ(name, description);
GET_BBC().GET_MAP_OBJ(key).put(name, result);
return result;
}
class GuageDynamicMBean implements DynamicMBean {
private final Map<String, Object> guages;
public GuageDynamicMBean(Map<String, Object> guages) {
this.guages = guages;
}
@Override
public MBeanInfo getMBeanInfo() {
MBeanAttributeInfo[] dAttributes = new MBeanAttributeInfo[guages.keySet().size()];
List<String> keySet = guages.keySet().stream().collect(Collectors.toList());
for (int i = 0; i < dAttributes.length; i++) {
String name = keySet.get(i);
MBeanAttributeᴶᴹˣ gc = MBeanAttributeᴶᴹˣ.class.cast(guages.get(name));
dAttributes[i] = new MBeanAttributeInfo(gc.getName(), gc.BãßValueType().getSimpleName(),
gc.getDescription(), true, false, false);
}
return new MBeanInfo(this.getClass().getName(), null, dAttributes, null, null,
new MBeanNotificationInfo[0]);
}
@Override
public Object getAttribute(String name) throws AttributeNotFoundException, MBeanException, ReflectionException {
MBeanAttributeᴶᴹˣ gc = MBeanAttributeᴶᴹˣ.class.cast(guages.get(name));
return gc.getValue();
}
@Override
public AttributeList getAttributes(String[] arg0) {
return null;
}
@Override
public Object invoke(String arg0, Object[] arg1, String[] arg2) throws MBeanException, ReflectionException {
return null;
}
@Override
public void setAttribute(Attribute arg0)
throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException {
}
@Override
public AttributeList setAttributes(AttributeList arg0) {
return null;
}
}
}

View file

@ -0,0 +1,46 @@
package love.distributedrebirth.bassboonyd.jmx;
import love.distributedrebirth.bassboonyd.BãßBȍőnAnnotationInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreKeyʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnConstantsʸᴰ;
import love.distributedrebirth.bassboonyd.DefaultEnumBaseʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
@BãßBȍőnAnnotationInfoʸᴰ(required = {BãßBȍőnClassInfoʸᴰ.class, BãßBȍőnAuthorInfoʸᴰ.class})
public interface DefaultEnumBaseᴶᴹˣ<T,K extends BãßBȍőnCoffinStoreKeyʸᴰ> extends DefaultEnumBaseʸᴰ<T>,BãßBȍőnCoffinStoreʸᴰ<K> {
void BȍőnJmxInit(K key);
default GuageCounterᴶᴹˣ BȍőnJmxInitGuageCounter(K key, String name) {
return BȍőnJmxInitGuageCounter(key, name, BãßBȍőnConstantsʸᴰ.STR_EMPTY);
}
default GuageCounterᴶᴹˣ BȍőnJmxInitGuageCounter(K key, String name, String description) {
GuageCounterᴶᴹˣ result = new GuageCounterᴶᴹˣ(name, description);
GET_BBC().GET_MAP_OBJ(key).put(name, result);
return result;
}
default StringAttributeᴶᴹˣ BȍőnJmxInitStringAttribute(K key, String name) {
return BȍőnJmxInitStringAttribute(key, name, BãßBȍőnConstantsʸᴰ.STR_EMPTY);
}
default StringAttributeᴶᴹˣ BȍőnJmxInitStringAttribute(K key, String name, String description) {
StringAttributeᴶᴹˣ result = new StringAttributeᴶᴹˣ(name, description);
GET_BBC().GET_MAP_OBJ(key).put(name, result);
return result;
}
default BooleanAttributeᴶᴹˣ BȍőnJmxInitBooleanAttribute(K key, String name) {
return BȍőnJmxInitBooleanAttribute(key, name, BãßBȍőnConstantsʸᴰ.STR_EMPTY);
}
default BooleanAttributeᴶᴹˣ BȍőnJmxInitBooleanAttribute(K key, String name, String description) {
BooleanAttributeᴶᴹˣ result = new BooleanAttributeᴶᴹˣ(name, description);
GET_BBC().GET_MAP_OBJ(key).put(name, result);
return result;
}
}

View file

@ -0,0 +1,39 @@
package love.distributedrebirth.bassboonyd.jmx;
import java.lang.management.ManagementFactory;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import love.distributedrebirth.bassboonyd.BãßBȍőnAnnotationInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreKeyʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnConstantsʸᴰ;
import love.distributedrebirth.bassboonyd.DefaultEnumInstanceʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
@BãßBȍőnAnnotationInfoʸᴰ(required = {BãßBȍőnClassInfoʸᴰ.class, BãßBȍőnAuthorInfoʸᴰ.class})
public interface DefaultEnumInstanceᴶᴹˣ<T,K extends BãßBȍőnCoffinStoreKeyʸᴰ> extends DefaultEnumBaseᴶᴹˣ<T,K>,DefaultEnumInstanceʸᴰ<T> {
@SuppressWarnings("unchecked")
default void BȍőnJmxInit(K key) {
BãßBȍőnCoffinOpenʸᴰ<K> coffin = BãßBȍőnCoffinOpenʸᴰ.class.cast(GET_BBC());
coffin.PUT_MAP(key);
try {
StringBuilder name = new StringBuilder();
name.append(BãßPackageNaam());
name.append(BãßBȍőnConstantsʸᴰ.STR_COLON);
name.append(BãßBȍőnConstantsʸᴰ.STR_TYPE);
name.append(BãßBȍőnConstantsʸᴰ.STR_IS);
name.append(BãßClassNaam());
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
ObjectName objectName1 = new ObjectName(name.toString());
server.registerMBean(new MBeanDynamicᴶᴹˣ(GET_BBC().GET_MAP_OBJ(key)), objectName1);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

View file

@ -0,0 +1,43 @@
package love.distributedrebirth.bassboonyd.jmx;
import java.lang.management.ManagementFactory;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import love.distributedrebirth.bassboonyd.BãßBȍőnAnnotationInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreKeyʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnConstantsʸᴰ;
import love.distributedrebirth.bassboonyd.DefaultEnumSetʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
@BãßBȍőnAnnotationInfoʸᴰ(required = {BãßBȍőnClassInfoʸᴰ.class, BãßBȍőnAuthorInfoʸᴰ.class})
public interface DefaultEnumSetᴶᴹˣ<T,K extends BãßBȍőnCoffinStoreKeyʸᴰ> extends DefaultEnumBaseᴶᴹˣ<T,K>,DefaultEnumSetʸᴰ<T> {
@SuppressWarnings("unchecked")
default void BȍőnJmxInit(K key) {
BãßBȍőnCoffinOpenʸᴰ<K> coffin = BãßBȍőnCoffinOpenʸᴰ.class.cast(GET_BBC());
coffin.PUT_MAP(key);
try {
StringBuilder name = new StringBuilder();
name.append(BãßPackageNaam());
name.append(BãßBȍőnConstantsʸᴰ.STR_COLON);
name.append(BãßBȍőnConstantsʸᴰ.STR_TYPE);
name.append(BãßBȍőnConstantsʸᴰ.STR_IS);
name.append(BãßClassNaam());
name.append(BãßBȍőnConstantsʸᴰ.STR_COMMA);
name.append(BãßBȍőnConstantsʸᴰ.STR_NAME);
name.append(BãßBȍőnConstantsʸᴰ.STR_IS);
name.append(BȍőnNaam());
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
ObjectName objectName1 = new ObjectName(name.toString());
server.registerMBean(new MBeanDynamicᴶᴹˣ(GET_BBC().GET_MAP_OBJ(key)), objectName1);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

View file

@ -15,6 +15,10 @@ public class GuageCounterᴶᴹˣ extends AbstractMBeanAttributeᴶᴹˣ {
counter++;
}
public void increment(long value) {
counter = counter + value;
}
public Object getValue() {
return Long.valueOf(counter);
}

View file

@ -0,0 +1,65 @@
package love.distributedrebirth.bassboonyd.jmx;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.management.Attribute;
import javax.management.AttributeList;
import javax.management.AttributeNotFoundException;
import javax.management.DynamicMBean;
import javax.management.InvalidAttributeValueException;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanException;
import javax.management.MBeanInfo;
import javax.management.MBeanNotificationInfo;
import javax.management.ReflectionException;
public class MBeanDynamicᴶᴹˣ implements DynamicMBean {
private final Map<String, Object> guages;
public MBeanDynamicᴶᴹˣ(Map<String, Object> guages) {
this.guages = guages;
}
@Override
public MBeanInfo getMBeanInfo() {
MBeanAttributeInfo[] dAttributes = new MBeanAttributeInfo[guages.keySet().size()];
List<String> keySet = guages.keySet().stream().collect(Collectors.toList());
for (int i = 0; i < dAttributes.length; i++) {
String name = keySet.get(i);
MBeanAttributeᴶᴹˣ gc = MBeanAttributeᴶᴹˣ.class.cast(guages.get(name));
dAttributes[i] = new MBeanAttributeInfo(gc.getName(), gc.BãßValueType().getSimpleName(),
gc.getDescription(), true, false, false);
}
return new MBeanInfo(this.getClass().getName(), null, dAttributes, null, null,
new MBeanNotificationInfo[0]);
}
@Override
public Object getAttribute(String name) throws AttributeNotFoundException, MBeanException, ReflectionException {
MBeanAttributeᴶᴹˣ gc = MBeanAttributeᴶᴹˣ.class.cast(guages.get(name));
return gc.getValue();
}
@Override
public AttributeList getAttributes(String[] arg0) {
return null;
}
@Override
public Object invoke(String arg0, Object[] arg1, String[] arg2) throws MBeanException, ReflectionException {
return null;
}
@Override
public void setAttribute(Attribute arg0)
throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException {
}
@Override
public AttributeList setAttributes(AttributeList arg0) {
return null;
}
}

View file

@ -31,6 +31,8 @@ import love.distributedrebirth.gdxapp.screen.ScreenIntroMission;
import love.distributedrebirth.gdxapp.screen.ScreenLoading;
import love.distributedrebirth.gdxapp.screen.ScreenUnicode4D;
import love.distributedrebirth.gdxapp.screen.SystemBaseGlyphRenderer;
import love.distributedrebirth.numberxd.base2t.Base2Terminator;
import love.distributedrebirth.numberxd.base2t.glyph.BaseGlyphSet;
import love.distributedrebirth.numberxd.base2t.part.warp.TOSWarpCore;
import love.distributedrebirth.numberxd.base2t.part.warp.TOSWarpCoreDriver;
import love.distributedrebirth.numberxd.base2t.part.warp.WaterBucket;
@ -94,6 +96,10 @@ public class Demo4DMain extends Game {
System.out.println("warpcore-nolock: requested");
}
// ref to init, remove later...
BaseGlyphSet.values()[0].BãßAuthorCopyright();
Base2Terminator.INSTANCE.BãßAuthorCopyright();
if (args.contains("full-screen")) {
System.out.println("full-screen: requested");
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());

View file

@ -8,19 +8,21 @@ import java.util.Iterator;
import java.util.List;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnEnumInstanceʸᴰ;
import love.distributedrebirth.numberxd.base2t.glyph.BãßBȍőnGlyphSetKeyʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ;
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ;
import love.distributedrebirth.bassboonyd.jmx.GuageCounterᴶᴹˣ;
import love.distributedrebirth.bassboonyd.jmx.MBeanStoreKeyᴶᴹˣ;
import love.distributedrebirth.numberxd.base2t.part.T08PartOctal;
import love.distributedrebirth.numberxd.base2t.type.V072Tong;
import love.distributedrebirth.numberxd.base2t.type.V144Tocta;
/**
* Terminate from and to classical bytes.
*/
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public enum Base2Terminator implements BãßBȍőnEnumInstanceʸᴰ<Base2Terminator> {
@BãßBȍőnClassInfoʸᴰ(name = "Base2Terminator", purpose = "Terminate from and to classical bytes.")
@BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.numberxd")
public enum Base2Terminator implements DefaultEnumInstanceᴶᴹˣ<Base2Terminator,MBeanStoreKeyᴶᴹˣ> {
INSTANCE;
@ -29,11 +31,28 @@ public enum Base2Terminator implements BãßBȍőnEnumInstanceʸᴰ<Base2Termina
private static final int BLOCK_TOCTA_SIZE = 18;
private static final int SHIFT_8 = 8;
private static final int SHIFT_16 = 16;
private final BãßBȍőnCoffinOpenʸᴰ<BãßBȍőnGlyphSetKeyʸᴰ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
public BãßBȍőnCoffinʸᴰ<BãßBȍőnGlyphSetKeyʸᴰ> GET_BBC() { return BBC; }
private final GuageCounterᴶᴹˣ readV072TongTypeReads;
private final GuageCounterᴶᴹˣ readV072TongByteWrites;
private final GuageCounterᴶᴹˣ readV144ToctaTypeReads;
private final GuageCounterᴶᴹˣ readV144ToctaByteWrites;
private final GuageCounterᴶᴹˣ writeV072TongByteReads;
private final GuageCounterᴶᴹˣ writeV072TongTypeWrites;
private final GuageCounterᴶᴹˣ writeV144ToctaBytesReads;
private final GuageCounterᴶᴹˣ writeV144ToctaTypeWrites;
private final BãßBȍőnCoffinOpenʸᴰ<MBeanStoreKeyᴶᴹˣ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
public BãßBȍőnCoffinʸᴰ<MBeanStoreKeyᴶᴹˣ> GET_BBC() { return BBC; }
private Base2Terminator() {
BBC.BOON_INIT(this);
BȍőnJmxInit(MBeanStoreKeyᴶᴹˣ.JMX);
readV072TongTypeReads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "readV072TongTypeReads");
readV072TongByteWrites = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "readV072TongByteWrites");
readV144ToctaTypeReads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "readV144ToctaTypeReads");
readV144ToctaByteWrites = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "readV144ToctaByteWrites");
writeV072TongByteReads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "writeV072TongByteReads");
writeV072TongTypeWrites = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "writeV072TongTypeWrites");
writeV144ToctaBytesReads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "writeV144ToctaBytesReads");
writeV144ToctaTypeWrites = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "writeV144ToctaTypeWrites");
}
public int Bãß2ReadTong(InputStream input, List<V072Tong> output) throws IOException {
@ -49,6 +68,8 @@ public enum Base2Terminator implements BãßBȍőnEnumInstanceʸᴰ<Base2Termina
output.add(new V072Tong(new BaseIteratorOctalAdapter(octals.iterator())));
totalBytes += BLOCK_TONG_SIZE;
}
readV072TongTypeReads.increment(output.size());
readV072TongByteWrites.increment(totalBytes);
return totalBytes;
}
@ -68,6 +89,8 @@ public enum Base2Terminator implements BãßBȍőnEnumInstanceʸᴰ<Base2Termina
output.add(new V144Tocta(new BaseIteratorOctalAdapter(octals.iterator())));
totalBytes += BLOCK_TOCTA_SIZE;
}
readV144ToctaTypeReads.increment(output.size());
readV144ToctaByteWrites.increment(totalBytes);
return totalBytes;
}
@ -86,11 +109,18 @@ public enum Base2Terminator implements BãßBȍőnEnumInstanceʸᴰ<Base2Termina
}
public int Bãß2WriteTong(List<V072Tong> data, OutputStream output) throws IOException {
return Bãß2Write(data, output);
int totalBytes = Bãß2Write(data, output);
writeV072TongByteReads.increment(totalBytes);
writeV072TongTypeWrites.increment(data.size());
return totalBytes;
}
public int Bãß2WriteTocta(List<V144Tocta> data, OutputStream output) throws IOException {
return Bãß2Write(data, output);
int totalBytes = Bãß2Write(data, output);
writeV144ToctaBytesReads.increment(totalBytes);
writeV144ToctaTypeWrites.increment(data.size());
return totalBytes;
}
private <T extends BaseNumber<T>> int Bãß2Write(List<T> data, OutputStream output) throws IOException {

View file

@ -1,7 +1,9 @@
package love.distributedrebirth.numberxd.base2t;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnEnumInstanceʸᴰ;
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ;
import love.distributedrebirth.bassboonyd.jmx.GuageCounterᴶᴹˣ;
import love.distributedrebirth.bassboonyd.jmx.MBeanStoreKeyᴶᴹˣ;
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartʸᴰ;
import love.distributedrebirth.numberxd.base2t.part.T02PartBinary;
import love.distributedrebirth.numberxd.base2t.part.T03PartTrit;
@ -18,14 +20,53 @@ import love.distributedrebirth.numberxd.base2t.part.T16PartHex;
import love.distributedrebirth.numberxd.base2t.part.T20PartScore;
import love.distributedrebirth.numberxd.base2t.part.T60PartSexagesimal;
import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
@BãßBȍőnClassInfoʸᴰ(name = "BasePartFactory", purpose = "Factory to access the bases.")
public enum BasePartFactory implements BãßBȍőnEnumInstanceʸᴰ<BasePartFactory> {
@BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.numberxd")
public enum BasePartFactory implements DefaultEnumInstanceᴶᴹˣ<BasePartFactory, MBeanStoreKeyᴶᴹˣ> {
INSTANCE;
private final GuageCounterᴶᴹˣ baseT02Reads;
private final GuageCounterᴶᴹˣ baseT03Reads;
private final GuageCounterᴶᴹˣ baseT04Reads;
private final GuageCounterᴶᴹˣ baseT05Reads;
private final GuageCounterᴶᴹˣ baseT06Reads;
private final GuageCounterᴶᴹˣ baseT07Reads;
private final GuageCounterᴶᴹˣ baseT08Reads;
private final GuageCounterᴶᴹˣ baseT09Reads;
private final GuageCounterᴶᴹˣ baseT10Reads;
private final GuageCounterᴶᴹˣ baseT11Reads;
private final GuageCounterᴶᴹˣ baseT12Reads;
private final GuageCounterᴶᴹˣ baseT16Reads;
private final GuageCounterᴶᴹˣ baseT20Reads;
private final GuageCounterᴶᴹˣ baseT60Reads;
private static final int[] SUPPORTED_BASES = {2,3,4,5,6,7,8,9,10,11,12,16,20,60};
private final BãßBȍőnCoffinOpenʸᴰ<MBeanStoreKeyᴶᴹˣ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
public BãßBȍőnCoffinʸᴰ<MBeanStoreKeyᴶᴹˣ> GET_BBC() { return BBC; }
private BasePartFactory() {
BBC.BOON_INIT(this);
BȍőnJmxInit(MBeanStoreKeyᴶᴹˣ.JMX);
baseT02Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT02Reads");
baseT03Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT03Reads");
baseT04Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT04Reads");
baseT05Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT05Reads");
baseT06Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT06Reads");
baseT07Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT07Reads");
baseT08Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT08Reads");
baseT09Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT09Reads");
baseT10Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT10Reads");
baseT11Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT11Reads");
baseT12Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT12Reads");
baseT16Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT16Reads");
baseT20Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT20Reads");
baseT60Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT60Reads");
}
public int[] BãßBases() {
return SUPPORTED_BASES;
@ -34,32 +75,46 @@ public enum BasePartFactory implements BãßBȍőnEnumInstanceʸᴰ<BasePartFact
public BãßBȍőnPartʸᴰ<?>[] BãßBuildPartsByBase(int base) {
switch (base) {
case 2:
baseT02Reads.increment();
return T02PartBinary.values();
case 3:
baseT03Reads.increment();
return T03PartTrit.values();
case 4:
baseT04Reads.increment();
return T04PartQuad.values();
case 5:
baseT05Reads.increment();
return T05PartPental.values();
case 6:
baseT06Reads.increment();
return T06PartSeximal.values();
case 7:
baseT07Reads.increment();
return T07PartPlanIt.values();
case 8:
baseT08Reads.increment();
return T08PartOctal.values();
case 9:
baseT09Reads.increment();
return T09PartNonary.values();
case 10:
baseT10Reads.increment();
return T10PartDecimal.values();
case 11:
baseT11Reads.increment();
return T11PartUndecimal.values();
case 12:
baseT12Reads.increment();
return T12PartUncial.values();
case 16:
baseT16Reads.increment();
return T16PartHex.values();
case 20:
baseT20Reads.increment();
return T20PartScore.values();
case 60:
baseT60Reads.increment();
return T60PartSexagesimal.values();
default:
throw new IllegalArgumentException("Unsupported base: "+base);

View file

@ -4,11 +4,13 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ;
import love.distributedrebirth.numberxd.base2t.part.T10PartDecimal;
import love.distributedrebirth.numberxd.base2t.part.T16PartHex;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
@BãßBȍőnClassInfoʸᴰ(name = "BaseGlyphSet", purpose = "The encoded base scripts.")
@BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.numberxd")
public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
// TODO: ImGui add font for SINHALA
@ -86,5 +88,6 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.HEXIMALS, hex);
BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.GEMATRIA, gematria);
BBC.BOON_INIT(this);
this.BȍőnJmxInit(BãßBȍőnGlyphSetKeyʸᴰ.JMX);
}
}

View file

@ -6,6 +6,8 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreKeyʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public enum BãßBȍőnGlyphSetKeyʸᴰ implements BãßBȍőnCoffinStoreKeyʸᴰ {
JMX,
NUMBERS,
GEMATRIA,
HEXIMALS,

View file

@ -2,10 +2,11 @@ package love.distributedrebirth.numberxd.base2t.glyph;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnEnumSetʸᴰ;
import love.distributedrebirth.bassboonyd.DefaultEnumSetʸᴰ;
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumSetᴶᴹˣ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface BãßBȍőnGlyphSetʸᴰ<T extends BãßBȍőnGlyphSetʸᴰ<T>> extends BãßBȍőnEnumSetʸᴰ<T>, BãßBȍőnCoffinStoreʸᴰ<BãßBȍőnGlyphSetKeyʸᴰ> {
public interface BãßBȍőnGlyphSetʸᴰ<T extends BãßBȍőnGlyphSetʸᴰ<T>> extends DefaultEnumSetᴶᴹˣ<T,BãßBȍőnGlyphSetKeyʸᴰ> {
default BaseGlyphSetNumber BȍőnGlyphSetNumber10() {
return GET_BBC().GET_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, BaseGlyphSetNumber.class);

View file

@ -6,12 +6,12 @@ import java.util.stream.Collectors;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinStoreʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnEnumSetʸᴰ;
import love.distributedrebirth.bassboonyd.DefaultEnumSetʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnInitMethodʸᴰ;
import love.distributedrebirth.numberxd.base2t.glyph.BaseGlyphSet;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface BãßBȍőnPartʸᴰ<T extends BãßBȍőnPartʸᴰ<T>> extends BãßBȍőnEnumSetʸᴰ<T>, BãßBȍőnCoffinStoreʸᴰ<BãßBȍőnPartKeyʸᴰ> {
public interface BãßBȍőnPartʸᴰ<T extends BãßBȍőnPartʸᴰ<T>> extends DefaultEnumSetʸᴰ<T>, BãßBȍőnCoffinStoreʸᴰ<BãßBȍőnPartKeyʸᴰ> {
@BãßBȍőnInitMethodʸᴰ
default void initMapTone(BãßBȍőnCoffinOpenʸᴰ<BãßBȍőnPartKeyʸᴰ> BBC) {

View file

@ -7,11 +7,10 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnClassInfoʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnEnumInstanceʸᴰ;
import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ;
import love.distributedrebirth.bassboonyd.jmx.BooleanAttributeᴶᴹˣ;
import love.distributedrebirth.bassboonyd.jmx.MBeanStoreKeyᴶᴹˣ;
import love.distributedrebirth.bassboonyd.jmx.BãßBȍőnEnumJmxʸᴰ;
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ;
import love.distributedrebirth.bassboonyd.jmx.GuageCounterᴶᴹˣ;
import love.distributedrebirth.bassboonyd.jmx.StringAttributeᴶᴹˣ;
import love.distributedrebirth.numberxd.base2t.BasePartFactory;
@ -21,18 +20,17 @@ import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
@BãßBȍőnClassInfoʸᴰ(name = "TOSWarpCore", purpose = "The warpcore writer and armor manager.")
@BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.numberxd")
public enum TOSWarpCore implements BãßBȍőnEnumInstanceʸᴰ<TOSWarpCore>,BãßBȍőnEnumJmxʸᴰ<TOSWarpCore,MBeanStoreKeyᴶᴹˣ> {
public enum TOSWarpCore implements DefaultEnumInstanceᴶᴹˣ<TOSWarpCore,MBeanStoreKeyᴶᴹˣ> {
INSTANCE;
private final BãßBȍőnCoffinOpenʸᴰ<MBeanStoreKeyᴶᴹˣ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
public BãßBȍőnCoffinʸᴰ<MBeanStoreKeyᴶᴹˣ> GET_BBC() { return BBC; }
private final BooleanAttributeᴶᴹˣ armedWarpCipherLock;
private final StringAttributeᴶᴹˣ armedWarpWaterName;
private final StringAttributeᴶᴹˣ armedWarpWaterDesc;
private final GuageCounterᴶᴹˣ warpCoreReads;
private final GuageCounterᴶᴹˣ warpCoreWrites;
private final BãßBȍőnCoffinOpenʸᴰ<MBeanStoreKeyᴶᴹˣ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
public BãßBȍőnCoffinʸᴰ<MBeanStoreKeyᴶᴹˣ> GET_BBC() { return BBC; }
private TOSWarpCore() {
BBC.BOON_INIT(this);