mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 19:39:37 +00:00
Removed LanguageManager
Added I18N static class Some code reformatting
This commit is contained in:
1 parent
1ffe80b8c9
commit
186cbda444
62 files changed
+360
-375
No files matched your search
@@ -115,15 +115,11 @@ public class FakeWorld extends World {
|
||||
/**
|
||||
* Creating objects without calling constructors.
|
||||
*/
|
||||
public static <T> T create(Class<T> clazz,
|
||||
Class<? super T> parent) {
|
||||
public static <T> T create(Class<T> clazz, Class<? super T> parent) {
|
||||
try {
|
||||
ReflectionFactory rf =
|
||||
ReflectionFactory.getReflectionFactory();
|
||||
ReflectionFactory rf = ReflectionFactory.getReflectionFactory();
|
||||
Constructor objDef = parent.getDeclaredConstructor();
|
||||
Constructor intConstr = rf.newConstructorForSerialization(
|
||||
clazz, objDef
|
||||
);
|
||||
Constructor intConstr = rf.newConstructorForSerialization(clazz, objDef);
|
||||
return clazz.cast(intConstr.newInstance());
|
||||
} catch (RuntimeException e) {
|
||||
throw e;
|
||||
|
||||
Reference in new issue
Block a user