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

34 lines
1.5 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package love.distributedrebirth.bassboonyd.info;
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());
}
}
}
}
}
}