diff --git a/demo4d-bassboonyd/src/main/love/distributedrebirth/bassboonyd/BãßBȍőnCoffinOpenʸᴰ.java b/demo4d-bassboonyd/src/main/love/distributedrebirth/bassboonyd/BãßBȍőnCoffinOpenʸᴰ.java index 5ff13641..fbb4e084 100644 --- a/demo4d-bassboonyd/src/main/love/distributedrebirth/bassboonyd/BãßBȍőnCoffinOpenʸᴰ.java +++ b/demo4d-bassboonyd/src/main/love/distributedrebirth/bassboonyd/BãßBȍőnCoffinOpenʸᴰ.java @@ -1,5 +1,6 @@ package love.distributedrebirth.bassboonyd; +import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; @@ -18,6 +19,18 @@ public interface BãßBȍőnCoffinOpenʸᴰ()); } + default void INIT_BOON(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 BãßBȍőnCoffinOpenʸᴰ newInstance() { return new BãßBȍőnCoffinOpenʸᴰ() { final Map initMap = new HashMap<>(); diff --git a/demo4d-bassboonyd/src/main/love/distributedrebirth/bassboonyd/BãßBȍőnInitMethodʸᴰ.java b/demo4d-bassboonyd/src/main/love/distributedrebirth/bassboonyd/BãßBȍőnInitMethodʸᴰ.java new file mode 100644 index 00000000..23ee74be --- /dev/null +++ b/demo4d-bassboonyd/src/main/love/distributedrebirth/bassboonyd/BãßBȍőnInitMethodʸᴰ.java @@ -0,0 +1,13 @@ +package love.distributedrebirth.bassboonyd; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD}) +public @interface BãßBȍőnInitMethodʸᴰ { + +} diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/Base2Terminator.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/Base2Terminator.java index e990f7a1..c01e61ba 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/Base2Terminator.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/Base2Terminator.java @@ -8,7 +8,10 @@ import java.util.Iterator; import java.util.List; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; +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.numberxd.base2t.part.T08PartOctal; import love.distributedrebirth.numberxd.base2t.type.V072Tong; import love.distributedrebirth.numberxd.base2t.type.V144Tocta; @@ -26,6 +29,12 @@ public enum Base2Terminator implements BãßBȍőnEnumInstanceʸᴰ BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance(); + public BãßBȍőnCoffinʸᴰ GET_BBC() { return BBC; } + + private Base2Terminator() { + BBC.INIT_BOON(this); + } public int Bãß2ReadTong(InputStream input, List output) throws IOException { int totalBytes = 0; diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSet.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSet.java index 71aa7601..7cf379ef 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSet.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/glyph/BaseGlyphSet.java @@ -84,5 +84,6 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ { BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.NUMBERS, numbers); BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.HEXIMALS, hex); BBC.PUT_OBJ(BãßBȍőnGlyphSetKeyʸᴰ.GEMATRIA, gematria); + BBC.INIT_BOON(this); } } diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartʸᴰ.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartʸᴰ.java index 2992e479..dce90ea4 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartʸᴰ.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/BãßBȍőnPartʸᴰ.java @@ -4,13 +4,25 @@ import java.util.Map; 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.BãßBȍőnInitMethodʸᴰ; import love.distributedrebirth.numberxd.base2t.glyph.BaseGlyphSet; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public interface BãßBȍőnPartʸᴰ> extends BãßBȍőnEnumSetʸᴰ, BãßBȍőnCoffinStoreʸᴰ { + @BãßBȍőnInitMethodʸᴰ + default void initMapTone(BãßBȍőnCoffinOpenʸᴰ BBC) { + BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); + } + + @BãßBȍőnInitMethodʸᴰ + default void initMapChina(BãßBȍőnCoffinOpenʸᴰ BBC) { + BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + } + default String BȍőnIdentifierTone() { return GET_BBC().GET_STR(BãßBȍőnPartKeyʸᴰ.ID_TONE); } diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T02PartBinary.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T02PartBinary.java index 9226a9b8..36cc1f43 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T02PartBinary.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T02PartBinary.java @@ -21,7 +21,6 @@ public enum T02PartBinary implements BãßBȍőnPartʸᴰ { BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ID_TONE, idTone); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, chinaKey); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + BBC.INIT_BOON(this); } } diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T03PartTrit.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T03PartTrit.java index 5b0f9ccb..eb135a69 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T03PartTrit.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T03PartTrit.java @@ -22,7 +22,6 @@ public enum T03PartTrit implements BãßBȍőnPartʸᴰ { BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ID_TONE, idTone); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, chinaKey); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + BBC.INIT_BOON(this); } } diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T04PartQuad.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T04PartQuad.java index d09a8a58..62166e94 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T04PartQuad.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T04PartQuad.java @@ -25,8 +25,7 @@ public enum T04PartQuad implements BãßBȍőnPartAlt1ʸᴰ { BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, chinaKey); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_1_VALUE, alt1Value); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + BBC.INIT_BOON(this); } public T02PartBinary splitPartBinary(T02PartBinary part) { diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T05PartPental.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T05PartPental.java index e1351352..013241e7 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T05PartPental.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T05PartPental.java @@ -28,7 +28,6 @@ public enum T05PartPental implements BãßBȍőnPartAlt2ʸᴰ { BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_1_VALUE, alt1Value); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_2_VALUE, alt2Value); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + BBC.INIT_BOON(this); } } diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T06PartSeximal.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T06PartSeximal.java index da51e19e..0dd6738a 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T06PartSeximal.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T06PartSeximal.java @@ -27,8 +27,7 @@ public enum T06PartSeximal implements BãßBȍőnPartAlt1ʸᴰ { BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, chinaKey); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_1_VALUE, alt1Value); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + BBC.INIT_BOON(this); } public T02PartBinary splitPartBinary() { diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T07PartPlanIt.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T07PartPlanIt.java index cd995d31..382ca6c3 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T07PartPlanIt.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T07PartPlanIt.java @@ -28,7 +28,6 @@ public enum T07PartPlanIt implements BãßBȍőnPartAlt1ʸᴰ { BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, chinaKey); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_1_VALUE, alt1Value); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + BBC.INIT_BOON(this); } } diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T08PartOctal.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T08PartOctal.java index cd964d35..78c5c841 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T08PartOctal.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T08PartOctal.java @@ -30,8 +30,7 @@ public enum T08PartOctal implements BãßBȍőnPartʸᴰ,BãßBȍ BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, chinaKey); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.SHIFT_BITS, Integer.valueOf(shiftBits)); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + BBC.INIT_BOON(this); } public static T08PartOctal indexOf(T08PartOctal group, int value) { diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T10PartDecimal.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T10PartDecimal.java index 49cf2610..9f0b5e8c 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T10PartDecimal.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T10PartDecimal.java @@ -33,7 +33,6 @@ public enum T10PartDecimal implements BãßBȍőnPartAlt2ʸᴰ { BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_1_VALUE, alt1Value); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_2_VALUE, alt2Value); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + BBC.INIT_BOON(this); } } diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T11PartUndecimal.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T11PartUndecimal.java index 3c0ab97c..3d9b4171 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T11PartUndecimal.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T11PartUndecimal.java @@ -32,7 +32,6 @@ public enum T11PartUndecimal implements BãßBȍőnPartAlt1ʸᴰ { BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, chinaKey); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_1_VALUE, alt1Value); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + BBC.INIT_BOON(this); } } diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T16PartHex.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T16PartHex.java index b76b0047..fe22ade4 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T16PartHex.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T16PartHex.java @@ -37,8 +37,7 @@ public enum T16PartHex implements BãßBȍőnPartAlt1ʸᴰ { BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, chinaKey); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, chinaValue); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_1_VALUE, alt1Value); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + BBC.INIT_BOON(this); } public T02PartBinary splitPartBinary(T04PartQuad part) { diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T20PartScore.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T20PartScore.java index 5ec63b29..5dc08956 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T20PartScore.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T20PartScore.java @@ -55,8 +55,7 @@ public enum T20PartScore implements BãßBȍőnPartAlt4ʸᴰ { BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_2_VALUE, alt2Value); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_3_VALUE, alt3Value); BBC.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.ALT_4_VALUE, alt4Value); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_TONE); - BBC.PUT_MAP(BãßBȍőnPartKeyʸᴰ.MAP_CHINA); + BBC.INIT_BOON(this); } public T20PartScore BãßValueOfOpenLC(String openLCKey) { diff --git a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T60PartSexagesimal.java b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T60PartSexagesimal.java index 4eb2c842..c9c87806 100644 --- a/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T60PartSexagesimal.java +++ b/demo4d-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T60PartSexagesimal.java @@ -79,7 +79,6 @@ public enum T60PartSexagesimal implements BãßBȍőnPartʸᴰ