gdxapp4d/demo4d-bassboonyd/src/main/love/distributedrebirth/bassboonyd/BãßBȍőnEnumʸᴰ.java

45 lines
1.2 KiB
Java
Raw Normal View History

2022-02-02 16:34:46 +00:00
package love.distributedrebirth.bassboonyd;
2022-02-02 17:01:10 +00:00
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
2022-02-02 16:34:46 +00:00
public interface BãßBȍőnEnumʸᴰ<T> {
String name();
2022-02-02 17:55:21 +00:00
// Bȍőn prefix is for set instance enum object called BãßBȍőnEnumSetʸᴰ
// Bãß prefix is for single instance enum objects called BãßBȍőnEnumInstanceʸᴰ
2022-02-02 16:34:46 +00:00
default String BȍőnNaam() {
return name();
}
2022-02-02 17:01:10 +00:00
@SuppressWarnings("unchecked")
default T[] BãßInstances() {
try {
2022-02-02 17:06:12 +00:00
Object result = getClass().getMethod(BãßBȍőnConstantsʸᴰ.STR_VALUES).invoke(null);
2022-02-02 17:01:10 +00:00
return (T[]) result;
} catch (Exception e) {
throw new RuntimeException(e);
}
2022-02-02 16:34:46 +00:00
}
2022-02-02 17:55:21 +00:00
2022-02-02 18:17:30 +00:00
default String BãßClassNaam() {
return getClass().getAnnotation(BãßBȍőnClassInfoʸᴰ.class).name();
2022-02-02 17:55:21 +00:00
}
2022-02-02 18:17:30 +00:00
default String BãßClassPurpose() {
return getClass().getAnnotation(BãßBȍőnClassInfoʸᴰ.class).purpose();
2022-02-02 17:55:21 +00:00
}
default String BãßAuthorNaam() {
return getClass().getAnnotation(BãßBȍőnAuthorInfoʸᴰ.class).name();
}
default String BãßAuthorCopyright() {
return getClass().getAnnotation(BãßBȍőnAuthorInfoʸᴰ.class).copyright();
}
default String BȍőnNaamI18N() {
2022-02-02 18:17:30 +00:00
return BãßClassNaam() + BãßBȍőnConstantsʸᴰ.STR_DOT + name();
2022-02-02 17:55:21 +00:00
}
2022-02-02 16:34:46 +00:00
}