Search in sources :

Example 6 with Injector

use of eu.okaeri.injector.Injector in project okaeri-platform by OkaeriPoland.

the class RequestHandlerComponentResolver method make.

@Override
public Object make(@NonNull ComponentCreator creator, @NonNull BeanManifest manifest, @NonNull Injector injector) {
    long start = System.currentTimeMillis();
    BeanManifest parent = manifest.getParent();
    Class<?> parentClass = parent.getType();
    Method method = manifest.getMethod();
    RequestHandlerMeta handlerMeta = RequestHandlerMeta.of(parentClass, method);
    int[] contextIndexes = handlerMeta.getContextIndexes();
    Map<Integer, Object[]> prefilledCallCache = new CacheMap<>(256);
    Handler handler = context -> {
        Object[] call = null;
        try {
            call = this.getCall(prefilledCallCache, handlerMeta, context, injector);
            method.invoke(parent.getObject(), call);
            this.flushCall(call, contextIndexes, handlerMeta);
        } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException exception) {
            this.logger.error("Handler (" + method + ") failure [" + Arrays.toString(call) + "]", exception);
        }
    };
    HandlerType handlerType = handlerMeta.getType();
    String handlerPath = handlerMeta.getPath();
    SimpleRouteRole[] handlerPermittedRoles = handlerMeta.getPermittedRoles();
    this.javalin.addHandler(handlerType, handlerPath, handler, handlerPermittedRoles);
    long took = System.currentTimeMillis() - start;
    creator.log(ComponentHelper.buildComponentMessage().type("Added handler").name(parentClass.getSimpleName() + "#" + method.getName()).took(took).meta("path", handlerPath).meta("type", handlerType).meta("permittedRoles", Arrays.stream(handlerPermittedRoles).map(SimpleRouteRole::getName).collect(Collectors.toList())).build());
    creator.increaseStatistics("handlers", 1);
    return handler;
}
Also used : Arrays(java.util.Arrays) Inject(eu.okaeri.injector.annotation.Inject) Logger(org.slf4j.Logger) NonNull(lombok.NonNull) RequestHandlerMeta(eu.okaeri.platform.web.meta.RequestHandlerMeta) Injector(eu.okaeri.injector.Injector) Javalin(io.javalin.Javalin) SimpleRouteRole(eu.okaeri.platform.web.meta.role.SimpleRouteRole) HandlerType(io.javalin.http.HandlerType) Collectors(java.util.stream.Collectors) InvocationTargetException(java.lang.reflect.InvocationTargetException) Handler(io.javalin.http.Handler) BeanManifest(eu.okaeri.platform.core.component.manifest.BeanManifest) ComponentHelper(eu.okaeri.platform.core.component.ComponentHelper) RequestHandlerHelper(eu.okaeri.platform.web.meta.RequestHandlerHelper) ComponentCreator(eu.okaeri.platform.core.component.creator.ComponentCreator) Context(io.javalin.http.Context) Parameter(java.lang.reflect.Parameter) OkaeriInjector(eu.okaeri.injector.OkaeriInjector) Map(java.util.Map) ComponentResolver(eu.okaeri.platform.core.component.creator.ComponentResolver) CacheMap(eu.okaeri.commons.cache.CacheMap) PathParamMeta(eu.okaeri.platform.web.meta.PathParamMeta) Method(java.lang.reflect.Method) HandlerType(io.javalin.http.HandlerType) Handler(io.javalin.http.Handler) Method(java.lang.reflect.Method) SimpleRouteRole(eu.okaeri.platform.web.meta.role.SimpleRouteRole) RequestHandlerMeta(eu.okaeri.platform.web.meta.RequestHandlerMeta) BeanManifest(eu.okaeri.platform.core.component.manifest.BeanManifest) CacheMap(eu.okaeri.commons.cache.CacheMap)

Example 7 with Injector

use of eu.okaeri.injector.Injector in project okaeri-platform by OkaeriPoland.

the class PlannedMethodTask method execute.

@Override
@SneakyThrows
public void execute(OkaeriPlatform platform) {
    // simple method, just call
    if (this.method.getParameters().length == 0) {
        this.method.invoke(this.parent);
        return;
    }
    // method with parameters, use injector
    Injector injector = platform.getInjector();
    if (injector == null) {
        throw new RuntimeException("Cannot execute methods with parameters without injector");
    }
    injector.invoke(this.parent, this.method);
}
Also used : Injector(eu.okaeri.injector.Injector) SneakyThrows(lombok.SneakyThrows)

Example 8 with Injector

use of eu.okaeri.injector.Injector in project okaeri-platform by OkaeriPoland.

the class ListenerComponentResolver method make.

@Override
public Object make(@NonNull ComponentCreator creator, @NonNull BeanManifest manifest, @NonNull Injector injector) {
    long start = System.currentTimeMillis();
    Class<?> manifestType = manifest.getType();
    Object instance = injector.createInstance(manifestType);
    Listener listener = (Listener) instance;
    this.plugin.getServer().getPluginManager().registerEvents(listener, this.plugin);
    long took = System.currentTimeMillis() - start;
    creator.log(ComponentHelper.buildComponentMessage().type("Added listener").name(listener.getClass().getSimpleName()).took(took).meta("methods", Arrays.stream(listener.getClass().getDeclaredMethods()).filter(method -> method.getAnnotation(EventHandler.class) != null).map(Method::getName).collect(Collectors.toList())).build());
    creator.increaseStatistics("listeners", 1);
    return listener;
}
Also used : Arrays(java.util.Arrays) Inject(eu.okaeri.injector.annotation.Inject) Component(eu.okaeri.platform.core.annotation.Component) NonNull(lombok.NonNull) Injector(eu.okaeri.injector.Injector) Collectors(java.util.stream.Collectors) EventHandler(org.bukkit.event.EventHandler) JavaPlugin(org.bukkit.plugin.java.JavaPlugin) BeanManifest(eu.okaeri.platform.core.component.manifest.BeanManifest) ComponentHelper(eu.okaeri.platform.core.component.ComponentHelper) ComponentCreator(eu.okaeri.platform.core.component.creator.ComponentCreator) ComponentResolver(eu.okaeri.platform.core.component.creator.ComponentResolver) Method(java.lang.reflect.Method) Listener(org.bukkit.event.Listener) Listener(org.bukkit.event.Listener) EventHandler(org.bukkit.event.EventHandler) Method(java.lang.reflect.Method)

Example 9 with Injector

use of eu.okaeri.injector.Injector in project okaeri-platform by OkaeriPoland.

the class MessagesComponentResolver method make.

@Override
@SuppressWarnings({ "unchecked", "ResultOfMethodCallIgnored" })
public Object make(@NonNull ComponentCreator creator, @NonNull BeanManifest manifest, @NonNull Injector injector) {
    if (!LocaleConfig.class.isAssignableFrom(manifest.getType())) {
        throw new IllegalArgumentException("Component of @Messages on type requires class to be a LocaleConfig: " + manifest);
    }
    Placeholders defaultPlaceholders = injector.getExact("placeholders", Placeholders.class).orElseThrow(() -> new IllegalArgumentException("cannot find placeholders required for @Messages"));
    long start = System.currentTimeMillis();
    Class<? extends LocaleConfig> beanClazz = (Class<? extends LocaleConfig>) manifest.getType();
    Messages messages = beanClazz.getAnnotation(Messages.class);
    String path = messages.path();
    String suffix = messages.suffix();
    Class<? extends Configurer> provider = messages.provider();
    Locale defaultLocale = Locale.forLanguageTag(messages.defaultLocale());
    boolean unpack = messages.unpack();
    File directory = new File(this.plugin.getDataFolder(), path);
    boolean directoryExisted = directory.exists();
    Map<Locale, String> packedLocales = new LinkedHashMap<>();
    if (unpack) {
        directory.mkdirs();
    }
    // unpack files from the resources
    try {
        JarFile jarFile = new JarFile(this.jarFile);
        Enumeration<JarEntry> entries = jarFile.entries();
        while (entries.hasMoreElements()) {
            JarEntry jarEntry = entries.nextElement();
            String entryName = jarEntry.getName();
            if (!entryName.startsWith(path + "/") || entryName.endsWith("/")) {
                continue;
            }
            File file = new File(this.plugin.getDataFolder(), entryName);
            if (file.exists()) {
                continue;
            }
            InputStream is = jarFile.getInputStream(jarEntry);
            FileOutputStream fos = (unpack && !directoryExisted) ? new FileOutputStream(file) : null;
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            while (is.available() > 0) {
                int read = is.read();
                if (fos != null)
                    fos.write(read);
                baos.write(read);
            }
            if (fos != null)
                fos.close();
            is.close();
            String name = file.getName();
            String localeName = name.substring(0, name.length() - suffix.length());
            if ("colors".equals(localeName)) {
                continue;
            }
            Locale locale = Locale.forLanguageTag(localeName);
            packedLocales.put(locale, new String(baos.toByteArray(), StandardCharsets.UTF_8));
        }
    } catch (IOException exception) {
        this.plugin.getLogger().log(Level.SEVERE, "Failed to unpack resources", exception);
        exception.printStackTrace();
    }
    // prepare serdes
    OkaeriSerdesPack[] serdesPacks = Stream.of(this.defaultConfigurerSerdes).map(injector::createInstance).distinct().toArray(OkaeriSerdesPack[]::new);
    // gather colors config
    I18nColorsConfig colorsConfig = ConfigManager.create(I18nColorsConfig.class, (it) -> {
        Configurer configurer = (provider == Messages.DEFAULT.class) ? this.defaultConfigurerProvider.get() : injector.createInstance(provider);
        it.withConfigurer(configurer, serdesPacks);
        it.withBindFile(new File(directory, "colors" + suffix));
        if (Files.exists(it.getBindFile()))
            it.load(true);
        if (unpack && !directoryExisted)
            it.saveDefaults();
    });
    // load file locales
    try {
        LocaleConfig template = LocaleConfigManager.createTemplate(beanClazz);
        File[] files = directory.listFiles((dir, name) -> name.toLowerCase(Locale.ROOT).endsWith(suffix));
        if (files == null)
            files = new File[0];
        BI18n i18n = new BI18n(colorsConfig, messages.prefix().field(), messages.prefix().marker(), this.defaultPlaceholdersFactory);
        i18n.setDefaultLocale(defaultLocale);
        i18n.registerLocaleProvider(this.i18nLocaleProvider);
        i18n.setPlaceholders(defaultPlaceholders.copy());
        List<Locale> loadedLocales = new ArrayList<>();
        injector.registerInjectable(path, template);
        // check path directory for locale files
        for (File file : files) {
            // read locale from name
            String name = file.getName();
            String localeName = name.substring(0, name.length() - suffix.length());
            if ("colors".equals(localeName))
                continue;
            Locale locale = Locale.forLanguageTag(localeName);
            // create configurer
            Configurer configurer = (provider == Messages.DEFAULT.class) ? this.defaultConfigurerProvider.get() : injector.createInstance(provider);
            // register
            LocaleConfig localeConfig = LocaleConfigManager.create(beanClazz, configurer, file, !defaultLocale.equals(locale));
            i18n.registerConfig(locale, localeConfig);
            creator.increaseStatistics("localeConfigs", 1);
            loadedLocales.add(locale);
        }
        // load packes locales
        for (Map.Entry<Locale, String> entry : packedLocales.entrySet()) {
            // gather data
            Locale locale = entry.getKey();
            String configString = entry.getValue();
            // already loaded from file
            if (loadedLocales.contains(locale))
                continue;
            // create configurer
            Configurer configurer = (provider == Messages.DEFAULT.class) ? this.defaultConfigurerProvider.get() : injector.createInstance(provider);
            // register
            LocaleConfig localeConfig = ConfigManager.create(beanClazz, (it) -> {
                it.withConfigurer(configurer);
                if (!defaultLocale.equals(locale))
                    it.getDeclaration().getFields().forEach((field) -> field.updateValue(null));
                it.load(configString);
            });
            i18n.registerConfig(locale, localeConfig);
            creator.increaseStatistics("localeConfigs", 1);
            loadedLocales.add(locale);
        }
        // default locale was not overwritten by a file
        if (!loadedLocales.contains(defaultLocale)) {
            // create configurer
            Configurer configurer = (provider == Messages.DEFAULT.class) ? this.defaultConfigurerProvider.get() : injector.createInstance(provider);
            // register default locale based on interface values
            LocaleConfig defaultLocaleConfig = ConfigManager.create(beanClazz, it -> {
                it.withBindFile(new File(directory, messages.defaultLocale() + suffix));
                it.withConfigurer(configurer);
                if (unpack && !directoryExisted)
                    it.saveDefaults();
            });
            i18n.registerConfig(defaultLocale, defaultLocaleConfig);
            creator.increaseStatistics("localeConfigs", 1);
            loadedLocales.add(defaultLocale);
        }
        long took = System.currentTimeMillis() - start;
        if ((beanClazz != I18nCommandsMessages.class) || DEBUG) {
            creator.log(ComponentHelper.buildComponentMessage().type("Loaded messages").name(beanClazz.getSimpleName()).took(took).meta("path", path).meta("suffix", suffix).meta("provider", provider.getSimpleName()).footer("  > " + loadedLocales.stream().map(Locale::toString).collect(Collectors.joining(", "))).build());
        }
        manifest.setName(path);
        return i18n;
    } catch (Exception exception) {
        throw new RuntimeException("Messages configuration load failure", exception);
    }
}
Also used : LocaleConfig(eu.okaeri.i18n.configs.LocaleConfig) java.util(java.util) PlaceholdersFactory(eu.okaeri.platform.core.placeholder.PlaceholdersFactory) JarFile(java.util.jar.JarFile) Injector(eu.okaeri.injector.Injector) Level(java.util.logging.Level) Messages(eu.okaeri.platform.core.annotation.Messages) JarEntry(java.util.jar.JarEntry) Configurer(eu.okaeri.configs.configurer.Configurer) ComponentResolver(eu.okaeri.platform.core.component.creator.ComponentResolver) Method(java.lang.reflect.Method) I18nColorsConfig(eu.okaeri.platform.bukkit.i18n.I18nColorsConfig) Inject(eu.okaeri.injector.annotation.Inject) I18nCommandsMessages(eu.okaeri.platform.minecraft.i18n.I18nCommandsMessages) LocaleConfigManager(eu.okaeri.i18n.configs.LocaleConfigManager) Files(java.nio.file.Files) NonNull(lombok.NonNull) Collectors(java.util.stream.Collectors) StandardCharsets(java.nio.charset.StandardCharsets) JavaPlugin(org.bukkit.plugin.java.JavaPlugin) Placeholders(eu.okaeri.placeholders.Placeholders) BeanManifest(eu.okaeri.platform.core.component.manifest.BeanManifest) BI18n(eu.okaeri.platform.bukkit.i18n.BI18n) Stream(java.util.stream.Stream) ComponentHelper(eu.okaeri.platform.core.component.ComponentHelper) java.io(java.io) LocaleProvider(eu.okaeri.i18n.provider.LocaleProvider) ComponentCreator(eu.okaeri.platform.core.component.creator.ComponentCreator) OkaeriSerdesPack(eu.okaeri.configs.serdes.OkaeriSerdesPack) ConfigManager(eu.okaeri.configs.ConfigManager) ConfigurerProvider(eu.okaeri.persistence.document.ConfigurerProvider) BI18n(eu.okaeri.platform.bukkit.i18n.BI18n) OkaeriSerdesPack(eu.okaeri.configs.serdes.OkaeriSerdesPack) Configurer(eu.okaeri.configs.configurer.Configurer) Messages(eu.okaeri.platform.core.annotation.Messages) I18nCommandsMessages(eu.okaeri.platform.minecraft.i18n.I18nCommandsMessages) LocaleConfig(eu.okaeri.i18n.configs.LocaleConfig) JarFile(java.util.jar.JarFile) JarEntry(java.util.jar.JarEntry) Placeholders(eu.okaeri.placeholders.Placeholders) JarFile(java.util.jar.JarFile) I18nColorsConfig(eu.okaeri.platform.bukkit.i18n.I18nColorsConfig)

Example 10 with Injector

use of eu.okaeri.injector.Injector in project okaeri-platform by OkaeriPoland.

the class MessagesComponentResolver method make.

@Override
@SuppressWarnings({ "unchecked", "ResultOfMethodCallIgnored" })
public Object make(@NonNull ComponentCreator creator, @NonNull BeanManifest manifest, @NonNull Injector injector) {
    if (!LocaleConfig.class.isAssignableFrom(manifest.getType())) {
        throw new IllegalArgumentException("Component of @Messages on type requires class to be a LocaleConfig: " + manifest);
    }
    Placeholders defaultPlaceholders = injector.getExact("placeholders", Placeholders.class).orElseThrow(() -> new IllegalArgumentException("cannot find placeholders required for @Messages"));
    long start = System.currentTimeMillis();
    Class<? extends LocaleConfig> beanClazz = (Class<? extends LocaleConfig>) manifest.getType();
    Messages messages = beanClazz.getAnnotation(Messages.class);
    String path = messages.path();
    String suffix = messages.suffix();
    Class<? extends Configurer> provider = messages.provider();
    Locale defaultLocale = Locale.forLanguageTag(messages.defaultLocale());
    boolean unpack = messages.unpack();
    File directory = new File(this.plugin.getDataFolder(), path);
    boolean directoryExisted = directory.exists();
    Map<Locale, String> packedLocales = new LinkedHashMap<>();
    if (unpack) {
        directory.mkdirs();
    }
    // unpack files from the resources
    try {
        File jar = this.plugin.getFile();
        JarFile jarFile = new JarFile(jar);
        Enumeration<JarEntry> entries = jarFile.entries();
        while (entries.hasMoreElements()) {
            JarEntry jarEntry = entries.nextElement();
            String entryName = jarEntry.getName();
            if (!entryName.startsWith(path + "/") || entryName.endsWith("/")) {
                continue;
            }
            File file = new File(this.plugin.getDataFolder(), entryName);
            if (file.exists()) {
                continue;
            }
            InputStream is = jarFile.getInputStream(jarEntry);
            FileOutputStream fos = (unpack && !directoryExisted) ? new FileOutputStream(file) : null;
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            while (is.available() > 0) {
                int read = is.read();
                if (fos != null)
                    fos.write(read);
                baos.write(read);
            }
            if (fos != null)
                fos.close();
            is.close();
            String name = file.getName();
            String localeName = name.substring(0, name.length() - suffix.length());
            if ("colors".equals(localeName)) {
                continue;
            }
            Locale locale = Locale.forLanguageTag(localeName);
            packedLocales.put(locale, new String(baos.toByteArray(), StandardCharsets.UTF_8));
        }
    } catch (IOException exception) {
        this.plugin.getLogger().log(Level.SEVERE, "Failed to unpack resources", exception);
        exception.printStackTrace();
    }
    // prepare serdes
    OkaeriSerdesPack[] serdesPacks = Stream.of(this.defaultConfigurerSerdes).map(injector::createInstance).distinct().toArray(OkaeriSerdesPack[]::new);
    // gather colors config
    I18nColorsConfig colorsConfig = ConfigManager.create(I18nColorsConfig.class, (it) -> {
        Configurer configurer = (provider == Messages.DEFAULT.class) ? this.defaultConfigurerProvider.get() : injector.createInstance(provider);
        it.withConfigurer(configurer, serdesPacks);
        it.withBindFile(new File(directory, "colors" + suffix));
        if (Files.exists(it.getBindFile()))
            it.load(true);
        if (unpack && !directoryExisted)
            it.saveDefaults();
    });
    // load file locales
    try {
        LocaleConfig template = LocaleConfigManager.createTemplate(beanClazz);
        File[] files = directory.listFiles((dir, name) -> name.toLowerCase(Locale.ROOT).endsWith(suffix));
        if (files == null)
            files = new File[0];
        BI18n i18n = new BI18n(colorsConfig, messages.prefix().field(), messages.prefix().marker(), this.defaultPlaceholdersFactory);
        i18n.setDefaultLocale(defaultLocale);
        i18n.registerLocaleProvider(this.i18nLocaleProvider);
        i18n.setPlaceholders(defaultPlaceholders.copy());
        List<Locale> loadedLocales = new ArrayList<>();
        injector.registerInjectable(path, template);
        // check path directory for locale files
        for (File file : files) {
            // read locale from name
            String name = file.getName();
            String localeName = name.substring(0, name.length() - suffix.length());
            if ("colors".equals(localeName))
                continue;
            Locale locale = Locale.forLanguageTag(localeName);
            // create configurer
            Configurer configurer = (provider == Messages.DEFAULT.class) ? this.defaultConfigurerProvider.get() : injector.createInstance(provider);
            // register
            LocaleConfig localeConfig = LocaleConfigManager.create(beanClazz, configurer, file, !defaultLocale.equals(locale));
            i18n.registerConfig(locale, localeConfig);
            creator.increaseStatistics("localeConfigs", 1);
            loadedLocales.add(locale);
        }
        // load packes locales
        for (Map.Entry<Locale, String> entry : packedLocales.entrySet()) {
            // gather data
            Locale locale = entry.getKey();
            String configString = entry.getValue();
            // already loaded from file
            if (loadedLocales.contains(locale))
                continue;
            // create configurer
            Configurer configurer = (provider == Messages.DEFAULT.class) ? this.defaultConfigurerProvider.get() : injector.createInstance(provider);
            // register
            LocaleConfig localeConfig = ConfigManager.create(beanClazz, (it) -> {
                it.withConfigurer(configurer);
                if (!defaultLocale.equals(locale))
                    it.getDeclaration().getFields().forEach((field) -> field.updateValue(null));
                it.load(configString);
            });
            i18n.registerConfig(locale, localeConfig);
            creator.increaseStatistics("localeConfigs", 1);
            loadedLocales.add(locale);
        }
        // default locale was not overwritten by a file
        if (!loadedLocales.contains(defaultLocale)) {
            // create configurer
            Configurer configurer = (provider == Messages.DEFAULT.class) ? this.defaultConfigurerProvider.get() : injector.createInstance(provider);
            // register default locale based on interface values
            LocaleConfig defaultLocaleConfig = ConfigManager.create(beanClazz, it -> {
                it.withBindFile(new File(directory, messages.defaultLocale() + suffix));
                it.withConfigurer(configurer);
                if (unpack && !directoryExisted)
                    it.saveDefaults();
            });
            i18n.registerConfig(defaultLocale, defaultLocaleConfig);
            creator.increaseStatistics("localeConfigs", 1);
            loadedLocales.add(defaultLocale);
        }
        long took = System.currentTimeMillis() - start;
        if ((beanClazz != I18nCommandsMessages.class) || DEBUG) {
            creator.log(ComponentHelper.buildComponentMessage().type("Loaded messages").name(beanClazz.getSimpleName()).took(took).meta("path", path).meta("suffix", suffix).meta("provider", provider.getSimpleName()).footer("  > " + loadedLocales.stream().map(Locale::toString).collect(Collectors.joining(", "))).build());
        }
        manifest.setName(path);
        return i18n;
    } catch (Exception exception) {
        throw new RuntimeException("Messages configuration load failure", exception);
    }
}
Also used : LocaleConfig(eu.okaeri.i18n.configs.LocaleConfig) java.util(java.util) BI18n(eu.okaeri.platform.bungee.i18n.BI18n) PlaceholdersFactory(eu.okaeri.platform.core.placeholder.PlaceholdersFactory) JarFile(java.util.jar.JarFile) Injector(eu.okaeri.injector.Injector) Level(java.util.logging.Level) Messages(eu.okaeri.platform.core.annotation.Messages) JarEntry(java.util.jar.JarEntry) Configurer(eu.okaeri.configs.configurer.Configurer) ComponentResolver(eu.okaeri.platform.core.component.creator.ComponentResolver) Method(java.lang.reflect.Method) Inject(eu.okaeri.injector.annotation.Inject) I18nCommandsMessages(eu.okaeri.platform.minecraft.i18n.I18nCommandsMessages) LocaleConfigManager(eu.okaeri.i18n.configs.LocaleConfigManager) Files(java.nio.file.Files) NonNull(lombok.NonNull) Collectors(java.util.stream.Collectors) StandardCharsets(java.nio.charset.StandardCharsets) I18nColorsConfig(eu.okaeri.platform.bungee.i18n.I18nColorsConfig) Placeholders(eu.okaeri.placeholders.Placeholders) BeanManifest(eu.okaeri.platform.core.component.manifest.BeanManifest) Stream(java.util.stream.Stream) ComponentHelper(eu.okaeri.platform.core.component.ComponentHelper) java.io(java.io) LocaleProvider(eu.okaeri.i18n.provider.LocaleProvider) ComponentCreator(eu.okaeri.platform.core.component.creator.ComponentCreator) OkaeriSerdesPack(eu.okaeri.configs.serdes.OkaeriSerdesPack) ConfigManager(eu.okaeri.configs.ConfigManager) Plugin(net.md_5.bungee.api.plugin.Plugin) ConfigurerProvider(eu.okaeri.persistence.document.ConfigurerProvider) BI18n(eu.okaeri.platform.bungee.i18n.BI18n) OkaeriSerdesPack(eu.okaeri.configs.serdes.OkaeriSerdesPack) Configurer(eu.okaeri.configs.configurer.Configurer) Messages(eu.okaeri.platform.core.annotation.Messages) I18nCommandsMessages(eu.okaeri.platform.minecraft.i18n.I18nCommandsMessages) LocaleConfig(eu.okaeri.i18n.configs.LocaleConfig) JarFile(java.util.jar.JarFile) JarEntry(java.util.jar.JarEntry) Placeholders(eu.okaeri.placeholders.Placeholders) JarFile(java.util.jar.JarFile) I18nColorsConfig(eu.okaeri.platform.bungee.i18n.I18nColorsConfig)

Aggregations

Injector (eu.okaeri.injector.Injector)13 OkaeriInjector (eu.okaeri.injector.OkaeriInjector)7 Inject (eu.okaeri.injector.annotation.Inject)6 ComponentHelper (eu.okaeri.platform.core.component.ComponentHelper)6 ComponentCreator (eu.okaeri.platform.core.component.creator.ComponentCreator)6 ComponentResolver (eu.okaeri.platform.core.component.creator.ComponentResolver)6 BeanManifest (eu.okaeri.platform.core.component.manifest.BeanManifest)6 Method (java.lang.reflect.Method)6 Collectors (java.util.stream.Collectors)6 NonNull (lombok.NonNull)6 Test (org.junit.jupiter.api.Test)6 ConfigManager (eu.okaeri.configs.ConfigManager)3 Configurer (eu.okaeri.configs.configurer.Configurer)3 OkaeriSerdesPack (eu.okaeri.configs.serdes.OkaeriSerdesPack)3 LocaleConfig (eu.okaeri.i18n.configs.LocaleConfig)3 LocaleConfigManager (eu.okaeri.i18n.configs.LocaleConfigManager)3 LocaleProvider (eu.okaeri.i18n.provider.LocaleProvider)3 Api (eu.okaeri.injectortest.element.Api)3 Worker (eu.okaeri.injectortest.element.Worker)3 ConfigurerProvider (eu.okaeri.persistence.document.ConfigurerProvider)3