Removed LanguageManager

Added I18N static class
Some code reformatting
This commit is contained in:
kordum committed 2017-05-09 20:07:11 +03:00
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;