Package org.apache.logging.log4j.core.config.plugins

Examples of org.apache.logging.log4j.core.config.plugins.PluginAliases


            final String pluginCategory = plugin.category();
            final Map<String, PluginType<?>> map = REGISTRY.getCategory(pluginCategory);
            String type = plugin.elementType().equals(Plugin.EMPTY) ? plugin.name() : plugin.elementType();
            PluginType<?> pluginType = new PluginType(clazz, type, plugin.printObject(), plugin.deferChildren());
            map.put(plugin.name().toLowerCase(), pluginType);
            final PluginAliases pluginAliases = clazz.getAnnotation(PluginAliases.class);
            if (pluginAliases != null) {
                for (String alias : pluginAliases.value()) {
                    type =  plugin.elementType().equals(Plugin.EMPTY) ? alias : plugin.elementType();
                    pluginType = new PluginType(clazz, type, plugin.printObject(), plugin.deferChildren());
                    map.put(alias.trim().toLowerCase(), pluginType);
                }
            }
View Full Code Here


            this.elements = elements;
        }

        @Override
        public Collection<PluginEntry> visitType(final TypeElement e, final Plugin plugin) {
            final PluginAliases aliases = e.getAnnotation(PluginAliases.class);
            if (aliases == null) {
                return DEFAULT_VALUE;
            }
            final Collection<PluginEntry> entries = new ArrayList<PluginEntry>(aliases.value().length);
            for (final String alias : aliases.value()) {
                final PluginEntry entry = new PluginEntry();
                entry.setKey(alias.toLowerCase());
                entry.setClassName(elements.getBinaryName(e).toString());
                entry.setName(Plugin.EMPTY.equals(plugin.elementType()) ? alias : plugin.elementType());
                entry.setPrintable(plugin.printObject());
View Full Code Here

TOP

Related Classes of org.apache.logging.log4j.core.config.plugins.PluginAliases

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.