Compare commits
4 commits
b55ab60332
...
813980f35c
| Author | SHA1 | Date | |
|---|---|---|---|
| 813980f35c | |||
| 1f958a1adc | |||
| 32fdf0e261 | |||
| 413da66d6a |
6 changed files with 43 additions and 26 deletions
|
|
@ -33,6 +33,7 @@ import java.util.function.Consumer;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᒢObjectTBone;
|
||||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᐪᓫᣗᔿᑊᣕᣔᐪᐤᣗ.T002ᖟ;
|
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᐪᓫᣗᔿᑊᣕᣔᐪᐤᣗ.T002ᖟ;
|
||||||
import ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ.ArrayLadderᴿᵂ;
|
import ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ.ArrayLadderᴿᵂ;
|
||||||
import ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ.Ladderᴿᵈ;
|
import ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ.Ladderᴿᵈ;
|
||||||
|
|
@ -45,19 +46,20 @@ import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAu
|
||||||
/// @author للَّٰهِilLצسُو
|
/// @author للَّٰهِilLצسُو
|
||||||
/// @version ©Δ∞ 仙上主天
|
/// @version ©Δ∞ 仙上主天
|
||||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||||
public interface PrimordialZerdinalSpaceMaterializer<T extends PrimordialZerdinalSpaceMaterializer<T>> extends PrimordialZerdinalSpaceBoundary {
|
public interface PrimordialZerdinalSpaceMaterializer<T extends PrimordialZerdinalSpaceMaterializer<T>> extends PrimordialZerdinalSpaceBoundary, ᒢObjectTBone<T> {
|
||||||
|
|
||||||
/// Materialize an number from the bounded zerdinal number space.
|
/// Materialize an number from the bounded zerdinal number space.
|
||||||
T zerdinalMaterializeSpace(int zerdinal);
|
T zerdinalMaterializeSpace(int zerdinal);
|
||||||
|
|
||||||
default RopeOfAzraelᴿᵈ<T> zerdinalSpaceRope() {
|
default RopeOfAzraelᴿᵈ<T> zerdinalSpaceRope() {
|
||||||
return new RopeOfAzraelᴿᵈ<T> () {
|
return new RopeOfAzraelᴿᵈ<T>() {
|
||||||
int zerdinalSpaceWalker = 0;
|
int zerdinalSpaceWalker = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public T002ᖟ hasNextᴿᵈ() {
|
public T002ᖟ hasNextᴿᵈ() {
|
||||||
return T002ᖟ.valueOf(zerdinalSpaceWalker < zerdinalSpaceBoundary());
|
return T002ᖟ.valueOf(zerdinalSpaceWalker < zerdinalSpaceBoundary());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public T nextᴿᵈ() {
|
public T nextᴿᵈ() {
|
||||||
if (zerdinalSpaceWalker >= zerdinalSpaceBoundary()) {
|
if (zerdinalSpaceWalker >= zerdinalSpaceBoundary()) {
|
||||||
|
|
@ -84,7 +86,7 @@ public interface PrimordialZerdinalSpaceMaterializer<T extends PrimordialZerdina
|
||||||
return zerdinalSpaceRodsToLadder(v -> v);
|
return zerdinalSpaceRodsToLadder(v -> v);
|
||||||
}
|
}
|
||||||
|
|
||||||
default Map<String,T> zerdinalSpaceRodsToMap(Function<T,String> keyMapper) {
|
default Map<String, T> zerdinalSpaceRodsToMap(Function<T, String> keyMapper) {
|
||||||
return zerdinalSpaceRodsToLadder().streamᴿᵈ().collect(Collectors.toMap(keyMapper, v -> v));
|
return zerdinalSpaceRodsToLadder().streamᴿᵈ().collect(Collectors.toMap(keyMapper, v -> v));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,20 +47,20 @@ public interface ZerdinalAḃåčȕs̈Rȧñk<T extends ZerdinalAḃåčȕs̈Rȧ
|
||||||
}
|
}
|
||||||
|
|
||||||
default T abacusRȧñkGotoFirst() {
|
default T abacusRȧñkGotoFirst() {
|
||||||
return abacusOperation(ZerdinalAḃåčȕs̈RȧñkWaterWorks.GOTO_FIRST, zerdinal()).materializeOutput(zerdinalMaterializeSpace(zerdinal()));
|
return abacusOperation(ZerdinalAḃåčȕs̈RȧñkWaterWorks.GOTO_FIRST, zerdinal()).materializeOutput(thisᵀᴮᵒⁿᵉ());
|
||||||
}
|
}
|
||||||
|
|
||||||
default T abacusRȧñkGotoLast() {
|
default T abacusRȧñkGotoLast() {
|
||||||
return abacusOperation(ZerdinalAḃåčȕs̈RȧñkWaterWorks.GOTO_LAST, zerdinal()).materializeOutput(zerdinalMaterializeSpace(zerdinal()));
|
return abacusOperation(ZerdinalAḃåčȕs̈RȧñkWaterWorks.GOTO_LAST, zerdinal()).materializeOutput(thisᵀᴮᵒⁿᵉ());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
default T abacusRȧñkGotoUp(boolean loop) {
|
default T abacusRȧñkGotoUp(boolean loop) {
|
||||||
return abacusOperation(ZerdinalAḃåčȕs̈RȧñkWaterWorks.PLUS, 1, loop).materializeOutput(zerdinalMaterializeSpace(zerdinal()));
|
return abacusOperation(ZerdinalAḃåčȕs̈RȧñkWaterWorks.PLUS, 1, loop).materializeOutput(thisᵀᴮᵒⁿᵉ());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
default T abacusRȧñkGotoDown(boolean loop) {
|
default T abacusRȧñkGotoDown(boolean loop) {
|
||||||
return abacusOperation(ZerdinalAḃåčȕs̈RȧñkWaterWorks.MINUS, 1, loop).materializeOutput(zerdinalMaterializeSpace(zerdinal()));
|
return abacusOperation(ZerdinalAḃåčȕs̈RȧñkWaterWorks.MINUS, 1, loop).materializeOutput(thisᵀᴮᵒⁿᵉ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,10 @@ abstract public class BassFaultAnchor extends BassFaultAnchorSignalStore {
|
||||||
super(error, signal, tracer);
|
super(error, signal, tracer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final BassFaultAnchor withSignalTrace(Class<?> signal, String key, Number value) {
|
||||||
|
return withSignalTrace(signal, key, value.toString());
|
||||||
|
}
|
||||||
|
|
||||||
public final BassFaultAnchor withSignalTrace(Class<?> signal, String key, String value) {
|
public final BassFaultAnchor withSignalTrace(Class<?> signal, String key, String value) {
|
||||||
fetchTraceSignalMap(signal).put(key, value);
|
fetchTraceSignalMap(signal).put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|
|
||||||
|
|
@ -43,51 +43,60 @@ public class FaultSignalTraceTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static class SpaceB {
|
static class SpaceB {
|
||||||
static void traceRootAccess() {
|
static void traceRootAccess(int productColor) {
|
||||||
try {
|
try {
|
||||||
SpaceA.traceRoot();
|
SpaceA.traceRoot();
|
||||||
} catch (FaultBeanInstantiation e) {
|
} catch (FaultBeanInstantiation e) {
|
||||||
throw e.withSignalTrace(SpaceB.class, "Name", "FoodSection").withSignalTrace(SpaceB.class, "From", "FoodEmail");
|
// test auto-esc of email header protection from java manifest v1 output
|
||||||
|
// and add stuff on the general whiteboard to play games
|
||||||
|
// and normal fault context signal tracing
|
||||||
|
throw e.withSignalTrace(SpaceB.class, "Name", "FoodSection")
|
||||||
|
.withSignalTrace(SpaceB.class, "From", "FoodEmail")
|
||||||
|
.withSignalTrace(SpaceB.class, "product-color", productColor)
|
||||||
|
.appendOnWhitePaper("Paper-SpaceB", "sissors");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static class SpaceC {
|
static class SpaceC {
|
||||||
static void traceRootCatchBass() {
|
static void traceRootCatchBass(String bearbar) {
|
||||||
try {
|
try {
|
||||||
SpaceB.traceRootAccess();
|
SpaceB.traceRootAccess((int) bearbar.charAt(0));
|
||||||
} catch (BassFaultAnchor e) {
|
} catch (BassFaultAnchor e) {
|
||||||
throw e.withSignalTrace(SpaceC.class, v -> {
|
throw e.withSignalTrace(SpaceC.class, v -> {
|
||||||
|
v.put("bearbar", bearbar);
|
||||||
v.put("Junit-Foo", "Bar");
|
v.put("Junit-Foo", "Bar");
|
||||||
v.put("Junit-仙上主天", "仙上主天");
|
v.put("Junit-仙上主天", "仙上主天"); // only works with manifest v2++
|
||||||
}).appendOnWhitePaper("Paper-SpaceC", "rock");
|
}).appendOnWhitePaper("Paper-SpaceC", "rock");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static class SpaceD {
|
static class SpaceD {
|
||||||
static void traceWrapClassic() {
|
static void traceWrapClassic(String foobar) {
|
||||||
try {
|
try {
|
||||||
SpaceC.traceRootCatchBass();
|
SpaceC.traceRootCatchBass(foobar);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IllegalArgumentException("Classic argument missing wrapper", e);
|
// classic java error wrapping to add meta info like call arguments for context in stack trace
|
||||||
|
throw new IllegalArgumentException("Classic argument missing wrapper with foobar " + foobar, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static class SpaceE {
|
static class SpaceE {
|
||||||
static void traceWrap() {
|
static void traceWrap(int eSpaceMine) {
|
||||||
try {
|
try {
|
||||||
SpaceD.traceWrapClassic();
|
SpaceD.traceWrapClassic("" + eSpaceMine * 1234);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new FaultBeanState(e, SpaceD.class).appendOnWhitePaper("Paper-SpaceE", "sissors");
|
throw new FaultStreamDelegate(e, SpaceD.class)
|
||||||
|
.withSignalTrace(SpaceE.class, "eSpaceMine", eSpaceMine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFaultString() {
|
public void testFaultString() {
|
||||||
FaultBeanState error = null;
|
BassFaultAnchor error = null;
|
||||||
try {
|
try {
|
||||||
SpaceE.traceWrap();
|
SpaceE.traceWrap(123);
|
||||||
} catch (FaultBeanState e) {
|
} catch (BassFaultAnchor e) {
|
||||||
error = e;
|
error = e;
|
||||||
}
|
}
|
||||||
Assertions.assertNotNull(error);
|
Assertions.assertNotNull(error);
|
||||||
|
|
@ -97,14 +106,14 @@ public class FaultSignalTraceTest {
|
||||||
//System.out.println(errorText.length()); // 3185, 3433
|
//System.out.println(errorText.length()); // 3185, 3433
|
||||||
Assertions.assertNotNull(errorText);
|
Assertions.assertNotNull(errorText);
|
||||||
Assertions.assertTrue(errorText.contains(error.getMessage()));
|
Assertions.assertTrue(errorText.contains(error.getMessage()));
|
||||||
Assertions.assertTrue(errorText.contains("FaultBeanState"));
|
Assertions.assertTrue(errorText.contains("FaultStreamDelegate"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFaultStringSitra() {
|
public void testFaultStringSitra() {
|
||||||
BassFaultAnchor error = null;
|
BassFaultAnchor error = null;
|
||||||
try {
|
try {
|
||||||
SpaceE.traceWrap();
|
SpaceE.traceWrap(123);
|
||||||
} catch (BassFaultAnchor e) {
|
} catch (BassFaultAnchor e) {
|
||||||
error = e;
|
error = e;
|
||||||
}
|
}
|
||||||
|
|
@ -119,5 +128,7 @@ public class FaultSignalTraceTest {
|
||||||
Assertions.assertTrue(sitraText.contains("FoodSection"));
|
Assertions.assertTrue(sitraText.contains("FoodSection"));
|
||||||
Assertions.assertTrue(sitraText.contains("SpaceC"));
|
Assertions.assertTrue(sitraText.contains("SpaceC"));
|
||||||
Assertions.assertTrue(sitraText.contains("Junit-Foo: Bar"));
|
Assertions.assertTrue(sitraText.contains("Junit-Foo: Bar"));
|
||||||
|
Assertions.assertTrue(sitraText.contains("eSpaceMine: 123"));
|
||||||
|
Assertions.assertTrue(sitraText.contains("product-color: 49"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,7 @@ public class FourCornerUnicodeImport {
|
||||||
} else if ('\u205F' == ctx.codePoint) {
|
} else if ('\u205F' == ctx.codePoint) {
|
||||||
space = 76; // medium math space 4/18 em = like u2008
|
space = 76; // medium math space 4/18 em = like u2008
|
||||||
} else if ('\u3000' == ctx.codePoint) {
|
} else if ('\u3000' == ctx.codePoint) {
|
||||||
space = 222; // CJK space fullwidth (??? or use 100% here ?)
|
space = 100; // CJK space fullwidth (china space is equal to real space of virtual user defined unicode4D space drawing)
|
||||||
} else if ('\u180E' == ctx.codePoint) {
|
} else if ('\u180E' == ctx.codePoint) {
|
||||||
space = 2; // mongolian vowel separator
|
space = 2; // mongolian vowel separator
|
||||||
} else if ('\u200B' == ctx.codePoint) {
|
} else if ('\u200B' == ctx.codePoint) {
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,7 @@ public class FourCornerZionStenoLexer {
|
||||||
|
|
||||||
public StenoScannerWordCakeSlice(FCFlameWordDish course) {
|
public StenoScannerWordCakeSlice(FCFlameWordDish course) {
|
||||||
super(course.cakePointMin(), course.cakePointMax());
|
super(course.cakePointMin(), course.cakePointMax());
|
||||||
this.course = Objects.requireNonNull(course);
|
this.course = course;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue