Renamed into to clazz
This commit is contained in:
parent
940a400818
commit
5397b7422f
285 changed files with 348 additions and 345 deletions
|
|
@ -0,0 +1,33 @@
|
|||
package love.distributedrebirth.bassboonyd.clazz;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.LinkedHashSet;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőn;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinNailʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnLoad殭屍;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnPhaseBarrierʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿª₮ḕ;
|
||||
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿª₮ḕInit注;
|
||||
|
||||
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface BãßBȍőnAnnotationʸᴰ<T, K extends BãßBȍőnCoffinNailʸᴰ> extends BãßBȍőn<T, K> {
|
||||
|
||||
public static class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ {
|
||||
|
||||
@BãßBȍőnꝐŕḯṿª₮ḕInit注(dependencies = {BãßBȍőnPhaseBarrierʸᴰ.Ꝑŕḯṿª₮ḕPhaseBoonLaw.class})
|
||||
private static void init(BãßBȍőn<?,?> boon) {
|
||||
for (Class<?> interfaceClass:BãßBȍőnLoad殭屍.walkInterfaces(boon.getClass(), new LinkedHashSet<>())) {
|
||||
BãßBȍőnAnnotation注 anno = interfaceClass.getAnnotation(BãßBȍőnAnnotation注.class);
|
||||
if (anno == null) {
|
||||
continue;
|
||||
}
|
||||
for (Class<? extends Annotation> required:anno.required()) {
|
||||
if (!boon.getClass().isAnnotationPresent(required)) {
|
||||
throw new IllegalStateException("Missing required annotation: "+required.getSimpleName()+" on: "+boon.getClass().getSimpleName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package love.distributedrebirth.bassboonyd.clazz;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.TYPE})
|
||||
public @interface BãßBȍőnAnnotation注 {
|
||||
|
||||
Class<? extends Annotation>[] required() default {};
|
||||
|
||||
Class<? extends Annotation>[] optional() default {};
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package love.distributedrebirth.bassboonyd.clazz;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőn;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinNailʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnPhaseBarrierʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿª₮ḕ;
|
||||
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿª₮ḕInit注;
|
||||
|
||||
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
@BãßBȍőnAnnotation注(optional = {BãßBȍőnAuthor注.class})
|
||||
public interface BãßBȍőnAuthorʸᴰ<T, K extends BãßBȍőnCoffinNailʸᴰ> extends BãßBȍőn<T,K> {
|
||||
|
||||
public static class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ {
|
||||
private static final String GHOST_KEY_AUTHOR_NAME = "authorName";
|
||||
private static final String GHOST_KEY_AUTHOR_COPYRIGHT = "authorCopyright";
|
||||
private static final String DEFAULT_AUTHOR_NAME = "奴隸來自 仙上主天";
|
||||
private static final String DEFAULT_AUTHOR_COPYRIGHT = "©Δ∞ 仙上主天";
|
||||
|
||||
@BãßBȍőnꝐŕḯṿª₮ḕInit注(dependencies = {BãßBȍőnPhaseBarrierʸᴰ.Ꝑŕḯṿª₮ḕPhaseBoonLaw.class})
|
||||
private static void init(BãßBȍőn<?,?> boon) {
|
||||
BãßBȍőnAuthor注 anno = boon.getClass().getAnnotation(BãßBȍőnAuthor注.class);
|
||||
boon.toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).PUT_GHOST(GHOST_KEY_AUTHOR_NAME, anno!=null?anno.name():DEFAULT_AUTHOR_NAME);
|
||||
boon.toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).PUT_GHOST(GHOST_KEY_AUTHOR_COPYRIGHT, anno!=null?anno.copyright():DEFAULT_AUTHOR_COPYRIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
default String BãßAuthorNaam() {
|
||||
return toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_STR(Ꝑŕḯṿª₮ḕ.GHOST_KEY_AUTHOR_NAME);
|
||||
}
|
||||
|
||||
default String BãßAuthorCopyright() {
|
||||
return toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_STR(Ꝑŕḯṿª₮ḕ.GHOST_KEY_AUTHOR_COPYRIGHT);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package love.distributedrebirth.bassboonyd.clazz;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Moves copyright into runtime class info.
|
||||
*/
|
||||
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.TYPE})
|
||||
public @interface BãßBȍőnAuthor注 {
|
||||
|
||||
String name();
|
||||
|
||||
String copyright();
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package love.distributedrebirth.bassboonyd.clazz;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőn;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinNailʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnPhaseBarrierʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿª₮ḕ;
|
||||
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿª₮ḕInit注;
|
||||
|
||||
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
@BãßBȍőnAnnotation注(optional = {BãßBȍőnInfo注.class})
|
||||
public interface BãßBȍőnInfoʸᴰ<T, K extends BãßBȍőnCoffinNailʸᴰ> extends BãßBȍőn<T, K> {
|
||||
|
||||
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";
|
||||
|
||||
@BãßBȍőnꝐŕḯṿª₮ḕInit注(dependencies = {BãßBȍőnPhaseBarrierʸᴰ.Ꝑŕḯṿª₮ḕPhaseBoonLaw.class})
|
||||
private static void init(BãßBȍőn<?,?> boon) {
|
||||
BãßBȍőnInfo注 anno = boon.getClass().getAnnotation(BãßBȍőnInfo注.class);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
// say = 說
|
||||
// meaning = 意
|
||||
|
||||
default String BãßClassNaam() {
|
||||
return toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_STR(Ꝑŕḯṿª₮ḕ.GHOST_KEY_BEAN_NAME);
|
||||
}
|
||||
|
||||
default String BãßClassPurpose() {
|
||||
return toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_STR(Ꝑŕḯṿª₮ḕ.GHOST_KEY_BEAN_PURPOSE);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package love.distributedrebirth.bassboonyd.clazz;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.TYPE})
|
||||
public @interface BãßBȍőnInfo注 {
|
||||
|
||||
String name() default "";
|
||||
|
||||
String purpose();
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package love.distributedrebirth.bassboonyd.clazz;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőn;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinNailʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnPhaseBarrierʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿª₮ḕ;
|
||||
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿª₮ḕInit注;
|
||||
|
||||
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
@BãßBȍőnAnnotation注(optional = {BãßBȍőnPackage注.class})
|
||||
public interface BãßBȍőnPackageʸᴰ<T, K extends BãßBȍőnCoffinNailʸᴰ> extends BãßBȍőn<T, K> {
|
||||
|
||||
public static class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ {
|
||||
private static final String GHOST_KEY_PACKAGE_NAME = "packageName";
|
||||
|
||||
@BãßBȍőnꝐŕḯṿª₮ḕInit注(dependencies = {BãßBȍőnPhaseBarrierʸᴰ.Ꝑŕḯṿª₮ḕPhaseBoonLaw.class})
|
||||
private static void init(BãßBȍőn<?,?> boon) {
|
||||
BãßBȍőnPackage注 anno = boon.getClass().getAnnotation(BãßBȍőnPackage注.class);
|
||||
boon.toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).PUT_GHOST(GHOST_KEY_PACKAGE_NAME, anno!=null?anno.name():boon.getClass().getPackage().getName());
|
||||
}
|
||||
}
|
||||
|
||||
default String BãßPackageNaam() {
|
||||
return toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_STR(Ꝑŕḯṿª₮ḕ.GHOST_KEY_PACKAGE_NAME);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package love.distributedrebirth.bassboonyd.clazz;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.TYPE})
|
||||
public @interface BãßBȍőnPackage注 {
|
||||
|
||||
String name();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue