gdxapp4d/gdxapp4d-lib/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboonyd/DefaultEnumBaseʸᴰ.java

33 lines
889 B
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-06 16:19:05 +00:00
public interface DefaultEnumBaseʸᴰ<T> extends DefaultAuthorInfoʸᴰ,DefaultClassInfoʸᴰ,DefaultPackageInfoʸᴰ {
int ordinal();
2022-02-02 16:34:46 +00:00
String name();
2022-02-11 12:48:24 +00:00
// Bȍőn prefix is for set instance enum object (called DefaultEnumSetʸᴰ)
// Bãß prefix is for single instance enum objects (called DefaultEnumInstanceʸᴰ)
2022-02-02 17:55:21 +00:00
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-06 16:19:05 +00:00
/*
2022-02-02 17:55:21 +00:00
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-06 16:19:05 +00:00
*/
2022-02-02 16:34:46 +00:00
}