gdxapp4d/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboonyd/clazz/BãßBȍőnInfoʸᴰ.java

42 lines
1.9 KiB
Java
Raw Normal View History

2022-10-17 16:42:12 +02:00
package love.distributedrebirth.bassboonyd.clazz;
2022-10-15 02:34:58 +02:00
import love.distributedrebirth.bassboonyd.BãßBȍőnʸᴰ;
2022-10-17 19:05:12 +02:00
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinNail;
2022-10-17 16:25:23 +02:00
import love.distributedrebirth.bassboonyd.BãßBȍőnPhaseBarrierʸᴰ;
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿª;
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿªḕInit注;
2022-10-15 02:34:58 +02:00
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
2022-10-17 16:42:12 +02:00
@BãßBȍőnAnnotation注(optional = {BãßBȍőnInfo注.class})
2022-10-17 19:05:12 +02:00
public interface BãßBȍőnInfoʸᴰ<T, K extends BãßBȍőnCoffinNail> extends BãßBȍőnʸᴰ<T, K> {
2022-10-15 02:34:58 +02:00
public static class Ꝑŕḯṿª implements BãßBȍőnꝐŕḯṿª {
private static final String GHOST_KEY_BEAN_NAME = "beanName";
private static final String GHOST_KEY_BEAN_PURPOSE = "beanPurpose";
private static final String DEFAULT_BEAN_PURPOSE = "Undefined";
2022-10-17 17:26:46 +02:00
@BãßBȍőnꝐŕḯṿªḕInit注(dependencies = {BãßBȍőnPhaseBarrierʸᴰ.βrahmanBoonLaw.class})
private static void init(BãßBȍőnʸᴰ<?,?> boon) {
2022-10-17 16:42:12 +02:00
BãßBȍőnInfo注 anno = boon.getClass().getAnnotation(BãßBȍőnInfo注.class);
2022-10-15 15:08:09 +02:00
String beanName = boon.getClass().getSimpleName();
String beanPurpose = DEFAULT_BEAN_PURPOSE;
if (anno != null && !anno.name().isBlank()) {
beanName = anno.name();
}
if (anno != null && !anno.purpose().isBlank()) {
beanPurpose = anno.purpose();
}
boon.toBBC().UNHOLY(Ꝑŕḯṿª.class).PUT_GHOST(GHOST_KEY_BEAN_NAME, beanName);
boon.toBBC().UNHOLY(Ꝑŕḯṿª.class).PUT_GHOST(GHOST_KEY_BEAN_PURPOSE, beanPurpose);
2022-10-15 02:34:58 +02:00
}
}
2022-10-17 17:55:32 +02:00
default String BãßInfoNaam() {
2022-10-15 13:20:04 +02:00
return toBBC().UNHOLY(Ꝑŕḯṿª.class).GHOST_STR(Ꝑŕḯṿª.GHOST_KEY_BEAN_NAME);
2022-10-15 02:34:58 +02:00
}
2022-10-17 17:55:32 +02:00
default String BãßInfoDoel() {
2022-10-15 13:20:04 +02:00
return toBBC().UNHOLY(Ꝑŕḯṿª.class).GHOST_STR(Ꝑŕḯṿª.GHOST_KEY_BEAN_PURPOSE);
2022-10-15 02:34:58 +02:00
}
}