JPP: Fixed spider injection on parent classes for bone terminator
This commit is contained in:
parent
960740d52c
commit
0e16c50571
9 changed files with 109 additions and 32 deletions
|
|
@ -175,6 +175,16 @@ public final class BãßBȍőnBőatGrav͜eDigge͗ŕ {
|
|||
final List<BãßꝐḯŕ₳₮ḕBőatPartyTrick> steps = new ArrayList<>();
|
||||
daznIstSuperErgebnis = new BãßꝐḯŕ₳₮ḕBőatParty(interfaces, boats, steps);
|
||||
𝔦𝔫𝔦𝔱𝔅𝔬𝔫𝔢𝔐𝔞𝔤𝔦𝔠(theBoneBȍőn.getClass(), daznIstSuperErgebnis.gͣ̒ͮ̂͐͐e͊ͬ̎͒͂̋ͥtͪ͡S̴pi̶͒̍ͥde̽̋̓r̃ͩ̑͛̒ͤ̕W͝eͮͯͣ̂͐̀b(), daznIstSuperErgebnis);
|
||||
for (Class<?> parent : ᒢObjectClass.亞.walkParents(theBoneBȍőn.thisᴰᴺᴬ())) {
|
||||
steps.addAll(BãßBȍőnSpider.EMPIRE.weaveWeb(daznIstSuperErgebnis.gͣ̒ͮ̂͐͐e͊ͬ̎͒͂̋ͥtͪ͡S̴pi̶͒̍ͥde̽̋̓r̃ͩ̑͛̒ͤ̕W͝eͮͯͣ̂͐̀b(), parent, theBoneBȍőn.getClass(), v -> {
|
||||
for (short i=0;i<boats.size();i++) {
|
||||
if (boats.get(i).getPirateClass().equals(v)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}));
|
||||
}
|
||||
steps.addAll(BãßBȍőnSpider.EMPIRE.weaveWeb(daznIstSuperErgebnis.gͣ̒ͮ̂͐͐e͊ͬ̎͒͂̋ͥtͪ͡S̴pi̶͒̍ͥde̽̋̓r̃ͩ̑͛̒ͤ̕W͝eͮͯͣ̂͐̀b(), theBoneBȍőn.getClass(), theBoneBȍőn.getClass(), v -> {
|
||||
for (short i=0;i<boats.size();i++) {
|
||||
if (boats.get(i).getPirateClass().equals(v)) {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ package ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ;
|
|||
import java.lang.reflect.Modifier;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
|
|
@ -66,6 +67,27 @@ public enum ᒢObjectClass {
|
|||
return Arrays.asList(clazz.getDeclaredMethods()).stream().filter(m -> Modifier.isAbstract(m.getModifiers())).count() == 0;
|
||||
}
|
||||
|
||||
public Set<Class<?>> walkParents(final Class<?> clazz) {
|
||||
return walkParents(clazz, new LinkedHashSet<>());
|
||||
}
|
||||
|
||||
private Set<Class<?>> walkParents(final Class<?> clazz, final Set<Class<?>> result) {
|
||||
return walkTree(clazz, result, v -> {
|
||||
if (v.getSuperclass() == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (Object.class.equals(v.getSuperclass())) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (Enum.class.equals(v.getSuperclass())) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return Arrays.asList(v.getSuperclass());
|
||||
}, v -> {
|
||||
return v.getSuperclass();
|
||||
});
|
||||
}
|
||||
|
||||
public Set<Class<?>> walkInterfaces(final Class<?> clazz) {
|
||||
return walkInterfaces(clazz, new LinkedHashSet<>());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,11 @@ import java.util.Objects;
|
|||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
|
||||
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᒃᐤᣔᐪ.BãßBȍőnBőatꞱᴿᴳᴮ;
|
||||
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᒄᓫᣔᐪᑋ.BãßBȍőnCoffinԲ;
|
||||
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᒄᓫᣔᐪᑋ.ᔆᣖᑊᒄᓫᣗ.BãßBȍőnSpiderWireFly注;
|
||||
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᒄᓫᣔᐪᑋ.ᔆᣖᑊᒄᓫᣗ.BãßBȍőnSpiderWire注;
|
||||
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᔿᓑᔿᔿᔋᐝᣚ.BãßᛗᚢᛗᛗᛉBoneBabe𓄯;
|
||||
import ᒢᐩᐩ.ᒃᣔᔆᔆᒃᐤᐤᣕ.ᔿᓑᔿᔿᔋᐝᣚ.BãßᛗᚢᛗᛗᛉVū́ǘrChaliceEnumShot𓄯;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒢᔿᕽ.Vū́ǘrBȍőnSupportꞱᴿᴳᴮ;
|
||||
|
|
@ -43,6 +46,7 @@ import ᒢᐩᐩ.ᣕᓑᔿᒃᓫᣗ.ᙆᓫᣗᒄᑊᣕᣔᒻ.PrimordialZerdinal;
|
|||
import ᒢᐩᐩ.ᣕᓑᔿᒃᓫᣗ.ᙆᓫᣗᒄᑊᣕᣔᒻ.PrimordialZerdinalSpaceBoundary;
|
||||
import ᒢᐩᐩ.ᣕᓑᔿᒃᓫᣗ.ᙆᓫᣗᒄᑊᣕᣔᒻ.PrimordialZerdinalSpaceMaterializer;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᒢℭỗᶇṧⱦᶏꬼȶʂ;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᐪᓫᣗᔿᑊᣕᣔᐪᐤᣗ.ᐦ.Terminator注;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᐪᓫᣗᔿᑊᣕᣔᐪᐤᣗ.ᐦ.Terminator𓄯;
|
||||
import ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ.ArrayLadderᴿᵂ;
|
||||
import ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ.Ladderᴿᵈ;
|
||||
|
|
@ -204,18 +208,27 @@ public enum TTꞱꞱᖟGateway implements BãßᛗᚢᛗᛗᛉVū́ǘrChaliceEnu
|
|||
return BAKED_IN_PIES;
|
||||
}
|
||||
|
||||
static abstract private class BoneTerminatorBaseX<T extends Terminator𓄯<T>> implements Terminator𓄯<T> {
|
||||
protected final int slices;
|
||||
static abstract private class BoneTerminatorBaseX<T extends Terminator𓄯<T>> implements Terminator𓄯<T>,BãßᛗᚢᛗᛗᛉBoneBabe𓄯<T> {
|
||||
//protected final int slices;
|
||||
protected final int slice;
|
||||
private final Function<Integer, T> creator;
|
||||
private BoneTerminatorBaseX(int slices, int slice, Function<Integer, T> creator) {
|
||||
if (slice > slices) {
|
||||
private final BãßBȍőnCoffinԲ ghostsInAShell = 亞ᶦᶦᶦ.thisʸᴰᐧᐧˡᶦᵍʰᵗˢᵃᵇᵉʳ(thisᵀᴮᵒⁿᵉ());
|
||||
|
||||
@BãßBȍőnSpiderWire注(paint = BãßBȍőnBőatꞱᴿᴳᴮ.ẞassPaint.ꞱAnnotationWire.class)
|
||||
private Terminator注 terminator注;
|
||||
|
||||
private BoneTerminatorBaseX(/*int slices,*/ int slice, Function<Integer, T> creator) {
|
||||
亞ᶦᶦᶦᶦ.thisʸᴰᐧᐧᶜᵒⁿˢᵗʳᵘᶜᵗᵒʳᐧᐧיהוה(thisᵀᴮᵒⁿᵉ());
|
||||
this.creator = Objects.requireNonNull(creator);
|
||||
this.slice = slice;
|
||||
//this.slices = terminator注.slices();
|
||||
if (slice > terminator注.slices()) {
|
||||
throw new IllegalArgumentException("Can't eat cake past one, slice to big: " + slice);
|
||||
}
|
||||
this.slices = slices;
|
||||
this.slice = slice;
|
||||
this.creator = Objects.requireNonNull(creator);
|
||||
亞ᶦᶦᶦᶦ.thisʸᴰᐧᐧᶜᵒⁿˢᵗʳᵘᶜᵗᵒʳᐧᐧיהוה(thisᵀᴮᵒⁿᵉ());
|
||||
}
|
||||
@Override
|
||||
public BãßBȍőnCoffinԲ thisᵀᴮᵒⁿᵉᴳʳᵃᵛᵉ() {
|
||||
return ghostsInAShell;
|
||||
}
|
||||
@Override
|
||||
public int zerdinal() {
|
||||
|
|
@ -223,7 +236,7 @@ public enum TTꞱꞱᖟGateway implements BãßᛗᚢᛗᛗᛉVū́ǘrChaliceEnu
|
|||
}
|
||||
@Override
|
||||
public int zerdinalSpaceBoundary() {
|
||||
return slices;
|
||||
return terminator注.slices();
|
||||
}
|
||||
@Override
|
||||
public T zerdinalMaterializeSpace(int zerdinal) {
|
||||
|
|
@ -234,7 +247,7 @@ public enum TTꞱꞱᖟGateway implements BãßᛗᚢᛗᛗᛉVū́ǘrChaliceEnu
|
|||
}
|
||||
@Override
|
||||
public String abacusRȧñkName() {
|
||||
return slice + "_" + slices;
|
||||
return slice + "_" + terminator注.slices();
|
||||
}
|
||||
}
|
||||
private interface PrimordialZerdinalMutexBaseX {
|
||||
|
|
@ -277,10 +290,11 @@ public enum TTꞱꞱᖟGateway implements BãßᛗᚢᛗᛗᛉVū́ǘrChaliceEnu
|
|||
return PART_0002;
|
||||
}
|
||||
}
|
||||
@Terminator注(slices = 1)
|
||||
static private class BoneZerdinalBase1 extends BoneTerminatorBaseX<BoneZerdinalBase1> implements PrimordialZerdinalBase1 {
|
||||
static public final BoneZerdinalBase1 IDENDITY = new BoneZerdinalBase1(ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO);
|
||||
private BoneZerdinalBase1(int slice) {
|
||||
super(1, slice, i -> new BoneZerdinalBase1(i)); // TODO: make anno optional and add slice count in an drum constructor
|
||||
super(slice, i -> new BoneZerdinalBase1(i)); // TODO: make anno optional and add slice count in an drum constructor
|
||||
}
|
||||
static public BoneZerdinalBase1 valueOf(int zerdinal) {
|
||||
return IDENDITY.zerdinalMaterializeSpace(zerdinal);
|
||||
|
|
@ -292,10 +306,11 @@ public enum TTꞱꞱᖟGateway implements BãßᛗᚢᛗᛗᛉVū́ǘrChaliceEnu
|
|||
return IDENDITY.zerdinalSpaceRodsToLadder().toArrayᴿᵈ(new BoneZerdinalBase1[] {});
|
||||
}
|
||||
}
|
||||
@Terminator注(slices = 2)
|
||||
static private class BoneZerdinalBase2 extends BoneTerminatorBaseX<BoneZerdinalBase2> implements PrimordialZerdinalBase2 {
|
||||
static public final BoneZerdinalBase2 IDENDITY = new BoneZerdinalBase2(ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO);
|
||||
private BoneZerdinalBase2(int slice) {
|
||||
super(2, slice, i -> new BoneZerdinalBase2(i));
|
||||
super(slice, i -> new BoneZerdinalBase2(i));
|
||||
}
|
||||
static public BoneZerdinalBase2 valueOf(int zerdinal) {
|
||||
return IDENDITY.zerdinalMaterializeSpace(zerdinal);
|
||||
|
|
@ -310,7 +325,7 @@ public enum TTꞱꞱᖟGateway implements BãßᛗᚢᛗᛗᛉVū́ǘrChaliceEnu
|
|||
|
||||
public Ladderᴿᵈ<? extends Terminator𓄯<?>> deliverPieSlices(int pieSlices) {
|
||||
//BoneZerdinalBase1 b1p1 = BoneZerdinalBase1.valueOf(BoneZerdinalBase1.PART_0001);
|
||||
//BoneZerdinalBase2 b2p1 = BoneZerdinalBase2.valueOf(BoneZerdinalBase2.PART_0001);
|
||||
//BoneZerdinalBase2 b2p1 = BoneZerdinalBase2.valueOf(BoneZerdinalBase2.PART_0001).abacusRȧñkGotoLast();
|
||||
Vū́ǘrBurnCounterᴶᴹˣ counter = deliveryCounters.get(pieSlices);
|
||||
if (counter == null) {
|
||||
synchronized (deliveryCounters) {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ public @interface Terminator注 {
|
|||
|
||||
int slices();
|
||||
|
||||
Class<? extends BabelẞlueText> duytsName();
|
||||
// @Deprecated TODO: move to nether dial tone for lookup
|
||||
Class<? extends BabelẞlueText> duytsName() default BabelẞlueText.class;
|
||||
|
||||
Class<? extends BabelẞlueText> duytsChina();
|
||||
Class<? extends BabelẞlueText> duytsChina() default BabelẞlueText.class;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,12 +148,18 @@ public interface Terminator𓄯<T extends Terminator𓄯<T>> extends ZerdinalA
|
|||
@SuppressWarnings("unchecked")
|
||||
default String zerdinalSpaceDuytsNaam(Class<? extends LinguaNode> linguaId) {
|
||||
Class<? extends BabelẞlueText> duytsName = backpackᴬᵐᵐᵒᴮᵒˣ().kȱġễlDɨng(TerminatorBullet.DUYTS_NAME, Class.class);
|
||||
if (BabelẞlueText.class.equals(duytsName)) {
|
||||
return null; // TODO: remove duyts bullets and replace linquaId with nether dial tones
|
||||
}
|
||||
return BabelẞlueTextFactory.亞.buildMessage(duytsName, linguaId);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default String zerdinalSpaceDuytsChina(Class<? extends LinguaNode> linguaId) {
|
||||
Class<? extends BabelẞlueText> duytsChina = backpackᴬᵐᵐᵒᴮᵒˣ().kȱġễlDɨng(TerminatorBullet.DUYTS_CHINA, Class.class);
|
||||
if (BabelẞlueText.class.equals(duytsChina)) {
|
||||
return null;
|
||||
}
|
||||
return BabelẞlueTextFactory.亞.buildMessage(duytsChina, linguaId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public interface ZerdinalAḃåčȕs̈RȧñkLine𓄯<T extends ZerdinalAḃåč
|
|||
@Override
|
||||
public void s͑um̴̆ͨ̅m͠ô̈́ṅͫͤ́̂Gh̕os̑ͫt̡̓̍s͜() {
|
||||
boon.thisᵀᴮᵒⁿᵉᴳʳᵃᵛᵉ().onheɨlḮgSpreǜk(Ꝑŕḯṿª₮ḕꝐḯŕ₳₮ḕʸᴰ.class).bewaarGềễstMap(GHOST_MAP_TONE);
|
||||
boon.thisᵀᴮᵒⁿᵉᴳʳᵃᵛᵉ().onheɨlḮgSpreǜk(Ꝑŕḯṿª₮ḕꝐḯŕ₳₮ḕʸᴰ.class).bewaarGềễst(GHOST_RANK_RING_TONE, boon.abacusRȧñkName());
|
||||
boon.thisᵀᴮᵒⁿᵉᴳʳᵃᵛᵉ().onheɨlḮgSpreǜk(Ꝑŕḯṿª₮ḕꝐḯŕ₳₮ḕʸᴰ.class).bewaarGềễst(GHOST_RANK_RING_TONE, "" /*boon.abacusRȧñkName()*/);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -38,11 +38,19 @@ public interface ZerdinalAḃåčȕs̈RȧñkOperationPipeWater extends ZerdinalA
|
|||
|
||||
int input2();
|
||||
|
||||
ZerdinalAḃåčȕs̈RȧñkOperationPipeWater outputPipe(int output);
|
||||
|
||||
void output(int output);
|
||||
|
||||
void outputCarry(boolean outputCarry);
|
||||
|
||||
int outputBoundry();
|
||||
|
||||
default ZerdinalAḃåčȕs̈RȧñkOperationPipeWater makeOutput(int output) {
|
||||
output(output);
|
||||
return this;
|
||||
}
|
||||
|
||||
default ZerdinalAḃåčȕs̈RȧñkOperationPipeWater makeOutputCarry(boolean outputCarry) {
|
||||
outputCarry(outputCarry);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,12 +82,6 @@ public final class ZerdinalAḃåčȕs̈RȧñkWaterClock implements ZerdinalAḃ
|
|||
return input2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZerdinalAḃåčȕs̈RȧñkOperationPipeWater outputPipe(int output) {
|
||||
output(output);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void output(int output) {
|
||||
this.output = output;
|
||||
|
|
|
|||
|
|
@ -35,34 +35,55 @@ import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAu
|
|||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public enum ZerdinalAḃåčȕs̈RȧñkWaterWorks implements ZerdinalAḃåčȕs̈RȧñkOperation {
|
||||
|
||||
GOTO_FIRST(pipe -> pipe.outputPipe(ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO)),
|
||||
GOTO_LAST(pipe -> pipe.outputPipe(pipe.outputBoundry() - ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟONE)),
|
||||
/*
|
||||
NOP(pipe -> pipe),
|
||||
FAULT(pipe -> {
|
||||
throw new IllegalStateException("Forced abacus fault"); // TODO: Add warp fault api dep
|
||||
}),
|
||||
FAULT_C(pipe -> {
|
||||
if (true == pipe.inputCarry()) {
|
||||
throw new IllegalStateException("Carry flag fault in pipe: " + pipe);
|
||||
}
|
||||
return pipe;
|
||||
}),
|
||||
FAULT_NC(pipe -> {
|
||||
if (false == pipe.inputCarry()) {
|
||||
throw new IllegalStateException("No carry fault in pipe: " + pipe);
|
||||
}
|
||||
return pipe;
|
||||
}),
|
||||
CHAIN_END ?
|
||||
*/
|
||||
CARRY_SET(pipe -> pipe.makeOutputCarry(true)),
|
||||
CARRY_CLEAR(pipe -> pipe.makeOutputCarry(false)),
|
||||
GOTO_FIRST(pipe -> pipe.makeOutput(ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO)),
|
||||
GOTO_LAST(pipe -> pipe.makeOutput(pipe.outputBoundry() - ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟONE)),
|
||||
PLUS(pipe -> {
|
||||
int result = pipe.input1() + pipe.input2();
|
||||
if (result >= pipe.outputBoundry()) {
|
||||
if (pipe.inputCarry()) {
|
||||
result = ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO;
|
||||
result = result - pipe.outputBoundry();
|
||||
} else {
|
||||
result = pipe.outputBoundry() - ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟONE;
|
||||
}
|
||||
pipe.outputCarry(true);
|
||||
}
|
||||
return pipe.outputPipe(result);
|
||||
return pipe.makeOutput(result);
|
||||
}),
|
||||
MINUS(pipe -> {
|
||||
int result = pipe.input1() - pipe.input2();
|
||||
if (result < ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO) {
|
||||
if (pipe.inputCarry()) {
|
||||
result = pipe.outputBoundry() - ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟONE;
|
||||
result = pipe.outputBoundry() + result;
|
||||
} else {
|
||||
result = ᒢℭỗᶇṧⱦᶏꬼȶʂ.INTᣟᐧᣟZERO;
|
||||
}
|
||||
pipe.outputCarry(true);
|
||||
}
|
||||
return pipe.outputPipe(result);
|
||||
return pipe.makeOutput(result);
|
||||
}),
|
||||
BIT_AND(pipe -> pipe.outputPipe(pipe.input1() & pipe.input2())),
|
||||
BIT_OR(pipe -> pipe.outputPipe(pipe.input1() | pipe.input2())),
|
||||
BIT_AND(pipe -> pipe.makeOutput(pipe.input1() & pipe.input2())),
|
||||
BIT_OR(pipe -> pipe.makeOutput(pipe.input1() | pipe.input2())),
|
||||
SHIFT_LEFT(pipe -> {
|
||||
//TODO: add carry input and output
|
||||
pipe.output(pipe.input1() << pipe.input2());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue