Package bear.annotations

Examples of bear.annotations.Shell


    public static String getName(Class<? extends Plugin> pluginClass) {
        bear.annotations.Plugin plugin = pluginClass.getAnnotation(bear.annotations.Plugin.class);

        if(plugin != null) return plugin.value();

        Shell shell = pluginClass.getAnnotation(Shell.class);

        if(shell != null) return shell.value();

        return shortenName(pluginClass.getName());
    }
View Full Code Here


        List<Class<? extends Plugin>> matchingClasses = newArrayList(Collections2.filter(getPlugins(),
            new Predicate<Class<? extends Plugin>>() {
                @Override
                public boolean apply(Class<? extends Plugin> input) {
                    Shell shell = input.getAnnotation(Shell.class);
                    if (shell != null && shell.value().equalsIgnoreCase(pluginName)) return true;
                    return input.getSimpleName().toLowerCase().contains(pluginName);
                }
            }));

        if (matchingClasses.isEmpty()) {
View Full Code Here

TOP

Related Classes of bear.annotations.Shell

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.